Coding style.

This commit is contained in:
Andrew Hamilton 2017-04-15 23:02:22 +02:00
parent a9b579e7d6
commit 1560db5f82
4 changed files with 7 additions and 4 deletions

View file

@ -466,6 +466,7 @@ def main(loop, appearance_changed_event, screen_widget, exit_loop=None):
loop.add_signal_handler(signal.SIGTERM, exit_loop)
asyncio.ensure_future(_update_screen(screen_widget,
appearance_changed_event))
with terminal.hidden_cursor(), terminal.fullscreen(), _urwid_screen() as urwid_screen:
with terminal.hidden_cursor(), terminal.fullscreen(), \
_urwid_screen() as urwid_screen:
loop.add_reader(sys.stdin, on_input, urwid_screen, screen_widget)
loop.run_forever()

View file

@ -39,7 +39,8 @@ class Color:
class CharStyle:
_POOL = weakref.WeakValueDictionary()
_TERMINAL256_FORMATTER = pygments.formatters.terminal256.Terminal256Formatter()
_TERMINAL256_FORMATTER = \
pygments.formatters.terminal256.Terminal256Formatter()
def __new__(cls, fg_color=None, bg_color=None, is_bold=False,
is_italic=False, is_underlined=False):

View file

@ -204,7 +204,8 @@ class ToolsTestCase(unittest.TestCase):
self._test_tool(tools.cpp_syntax_gcc, [("hello.cpp", tools.Status.ok)])
def test_cpp_syntax_clang(self):
self._test_tool(tools.cpp_syntax_clang, [("hello.cpp", tools.Status.ok)])
self._test_tool(tools.cpp_syntax_clang,
[("hello.cpp", tools.Status.ok)])
def test_bcpp(self):
self._test_tool(tools.bcpp, [("hello.cpp", tools.Status.normal)])