home · contact · privacy
Some more code style improvements after flake8.
[plomrogue2] / rogue_chat_curses.py
index 80a167eea6d5c042c401bf4d93a9482f8ab887f3..466c9b7d72a69f25ed999cf18bf13b2bd1ab5da3 100755 (executable)
@@ -467,8 +467,8 @@ class TUI:
     def reconnect(self):
         self.log_msg('@ attempting reconnect')
         self.send('QUIT')
-        time.sleep(0.1)  # FIXME necessitated by some some strange SSL race
-                         # conditions with ws4py, find out what exactly
+        # necessitated by some strange SSL race conditions with ws4py
+        time.sleep(0.1)  # FIXME find out why exactly necessary
         self.switch_mode('waiting_for_server')
         self.connect()
 
@@ -525,7 +525,7 @@ class TUI:
         if self.mode.name in {'control_tile_draw', 'control_tile_type',
                               'control_pw_type'}:
             self.map_mode = 'protections'
-        elif self.mode.name!= 'edit':
+        elif self.mode.name != 'edit':
             self.map_mode = 'terrain + things'
         if self.mode.shows_info or self.mode.name == 'control_tile_draw':
             player = self.game.get_thing(self.game.player_id)
@@ -724,7 +724,7 @@ class TUI:
             if type(self.game.map_geometry) == MapGeometryHex:
                 indent = 0
                 for line in map_lines_split:
-                    map_lines += [indent*' ' + ''.join(line)]
+                    map_lines += [indent * ' ' + ''.join(line)]
                     indent = 0 if indent else 1
             else:
                 for line in map_lines_split:
@@ -788,7 +788,7 @@ class TUI:
             for i in range(self.size.y):
                 safe_addstr(i,
                             self.window_width * (not self.mode.has_input_prompt),
-                            ' '*self.window_width)
+                            ' ' * self.window_width)
             lines = []
             for line in content.split('\n'):
                 lines += msg_into_lines_of_width(line, self.window_width)
@@ -816,7 +816,7 @@ class TUI:
                 draw_help()
 
         curses.curs_set(False)  # hide cursor
-        curses.use_default_colors();
+        curses.use_default_colors()
         stdscr.timeout(10)
         reset_screen_size()
         self.explorer = YX(0, 0)
@@ -977,7 +977,7 @@ class TUI:
                 if self.mode.mode_switch_on_key(self, key):
                     continue
                 elif key == self.keys['flatten'] and\
-                     'FLATTEN_SURROUNDINGS' in self.game.tasks:
+                    'FLATTEN_SURROUNDINGS' in self.game.tasks:
                     self.send('TASK:FLATTEN_SURROUNDINGS ' + quote(self.password))
                 elif key == self.keys['toggle_map_mode']:
                     self.toggle_map_mode()