summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--ranger/api/commands.py2
-rw-r--r--ranger/container/directory.py2
-rw-r--r--ranger/container/fsobject.py2
-rw-r--r--ranger/core/main.py10
-rw-r--r--ranger/core/runner.py2
-rw-r--r--ranger/ext/keybinding_parser.py2
-rw-r--r--ranger/ext/shell_escape.py2
-rw-r--r--ranger/gui/ansi.py2
-rw-r--r--ranger/gui/context.py4
-rw-r--r--ranger/gui/ui.py2
10 files changed, 15 insertions, 15 deletions
diff --git a/ranger/api/commands.py b/ranger/api/commands.py
index 7d1b7506..8ba2a3a0 100644
--- a/ranger/api/commands.py
+++ b/ranger/api/commands.py
@@ -142,7 +142,7 @@ class Command(FileManagerAware):
 
     def start(self, n):
         """Returns everything until (inclusively) arg(n)"""
-        return ' '.join(self.args[:n]) + " " # XXX
+        return ' '.join(self.args[:n]) + " "  # XXX
 
     def shift(self):
         del self.args[0]
diff --git a/ranger/container/directory.py b/ranger/container/directory.py
index 911a6060..4efc6b37 100644
--- a/ranger/container/directory.py
+++ b/ranger/container/directory.py
@@ -224,7 +224,7 @@ class Directory(FileSystemObject, Accumulator, Loadable):
 
     def refilter(self):
         if self.files_all is None:
-            return # propably not loaded yet
+            return  # propably not loaded yet
 
         self.last_update_time = time()
 
diff --git a/ranger/container/fsobject.py b/ranger/container/fsobject.py
index 272e1b21..ebe76cdb 100644
--- a/ranger/container/fsobject.py
+++ b/ranger/container/fsobject.py
@@ -175,7 +175,7 @@ class FileSystemObject(FileManagerAware, SettingsAware):
         """Used in garbage-collecting.  Override in Directory"""
 
     def look_up_cumulative_size(self):
-        pass # normal files have no cumulative size
+        pass  # normal files have no cumulative size
 
     def set_mimetype(self):
         """assign attributes such as self.video according to the mimetype"""
diff --git a/ranger/core/main.py b/ranger/core/main.py
index 0b894243..042926aa 100644
--- a/ranger/core/main.py
+++ b/ranger/core/main.py
@@ -36,7 +36,7 @@ def main():
     if arg.copy_config is not None:
         fm = FM()
         fm.copy_config_files(arg.copy_config)
-        return 1 if arg.fail_unless_cd else 0 # COMPAT
+        return 1 if arg.fail_unless_cd else 0  # COMPAT
     if arg.list_tagged_files:
         fm = FM()
         try:
@@ -53,7 +53,7 @@ def main():
                         sys.stdout.write(line[2:])
                 elif len(line) > 0 and '*' in arg.list_tagged_files:
                     sys.stdout.write(line)
-        return 1 if arg.fail_unless_cd else 0 # COMPAT
+        return 1 if arg.fail_unless_cd else 0  # COMPAT
 
     SettingsAware._setup(Settings())
 
@@ -85,7 +85,7 @@ def main():
             rifle = Rifle(rifleconf)
             rifle.reload_config()
             rifle.execute(targets, number=ranger.arg.mode, flags=ranger.arg.flags)
-            return 1 if arg.fail_unless_cd else 0 # COMPAT
+            return 1 if arg.fail_unless_cd else 0  # COMPAT
 
     crash_traceback = None
     try:
@@ -104,7 +104,7 @@ def main():
             for key in range(33, 127):
                 if key not in maps:
                     print(chr(key))
-            return 1 if arg.fail_unless_cd else 0 # COMPAT
+            return 1 if arg.fail_unless_cd else 0  # COMPAT
 
         if not sys.stdin.isatty():
             sys.stderr.write("Error: Must run ranger from terminal\n")
@@ -241,7 +241,7 @@ def parse_arguments():
     arg.confdir = expanduser(arg.confdir)
     arg.cachedir = expanduser(default_cachedir)
 
-    if arg.fail_unless_cd: # COMPAT
+    if arg.fail_unless_cd:  # COMPAT
         sys.stderr.write("Warning: The option --fail-unless-cd is deprecated.\n"
             "It was used to faciliate using ranger as a file launcher.\n"
             "Now, please use the standalone file launcher 'rifle' instead.\n")
diff --git a/ranger/core/runner.py b/ranger/core/runner.py
index 0ffa6938..62da3ff7 100644
--- a/ranger/core/runner.py
+++ b/ranger/core/runner.py
@@ -174,7 +174,7 @@ class Runner(object):
             toggle_ui = False
             context.wait = False
         if 'w' in context.flags:
-            if not pipe_output and context.wait: # <-- sanity check
+            if not pipe_output and context.wait:  # <-- sanity check
                 wait_for_enter = True
         if 'r' in context.flags:
             # TODO: make 'r' flag work with pipes
diff --git a/ranger/ext/keybinding_parser.py b/ranger/ext/keybinding_parser.py
index 4e9375bf..84a4a068 100644
--- a/ranger/ext/keybinding_parser.py
+++ b/ranger/ext/keybinding_parser.py
@@ -235,7 +235,7 @@ class KeyBuffer(object):
         if not self.finished_parsing_quantifier and key in digits:
             if self.quantifier is None:
                 self.quantifier = 0
-            self.quantifier = self.quantifier * 10 + key - 48 # (48 = ord(0))
+            self.quantifier = self.quantifier * 10 + key - 48  # (48 = ord(0))
         else:
             self.finished_parsing_quantifier = True
 
diff --git a/ranger/ext/shell_escape.py b/ranger/ext/shell_escape.py
index 44984405..91736228 100644
--- a/ranger/ext/shell_escape.py
+++ b/ranger/ext/shell_escape.py
@@ -20,7 +20,7 @@ def shell_escape(arg):
     arg = str(arg)
     if UNESCAPABLE & set(arg):
         return shell_quote(arg)
-    arg = arg.replace('\\', '\\\\') # make sure this comes at the start
+    arg = arg.replace('\\', '\\\\')  # make sure this comes at the start
     for k, v in META_DICT.items():
         arg = arg.replace(k, v)
     return arg
diff --git a/ranger/gui/ansi.py b/ranger/gui/ansi.py
index 57a69442..ffa9425c 100644
--- a/ranger/gui/ansi.py
+++ b/ranger/gui/ansi.py
@@ -149,7 +149,7 @@ def char_slice(ansi_text, start, length):
         old_pos = pos
         pos += len(chunk)
         if pos <= start:
-            pass # seek
+            pass  # seek
         elif old_pos < start and pos >= start:
             chunks.append(last_color)
             chunks.append(chunk[start-old_pos:start-old_pos+length])
diff --git a/ranger/gui/context.py b/ranger/gui/context.py
index d5352a0a..e577d2be 100644
--- a/ranger/gui/context.py
+++ b/ranger/gui/context.py
@@ -13,8 +13,8 @@ CONTEXT_KEYS = ['reset', 'error', 'badinfo',
         'space', 'permissions', 'owner', 'group', 'mtime', 'nlink',
         'scroll', 'all', 'bot', 'top', 'percentage', 'filter',
         'flat', 'marked', 'tagged', 'tag_marker', 'cut', 'copied',
-        'help_markup', # COMPAT
-        'seperator', 'key', 'special', 'border', # COMPAT
+        'help_markup',  # COMPAT
+        'seperator', 'key', 'special', 'border',  # COMPAT
         'title', 'text', 'highlight', 'bars', 'quotes', 'tab', 'loaded',
         'keybuffer',
         'infostring',
diff --git a/ranger/gui/ui.py b/ranger/gui/ui.py
index aa3f90a8..7e873f4c 100644
--- a/ranger/gui/ui.py
+++ b/ranger/gui/ui.py
@@ -93,7 +93,7 @@ class UI(DisplayableContainer):
             self.setup()
             self.win.addstr("loading...")
             self.win.refresh()
-            self._draw_title = curses.tigetflag('hs') # has_status_line
+            self._draw_title = curses.tigetflag('hs')  # has_status_line
 
         self.update_size()
         self.is_on = True