summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--ranger/container/directory.py2
-rw-r--r--ranger/container/settings.py4
-rw-r--r--ranger/core/actions.py4
-rw-r--r--ranger/core/main.py4
-rw-r--r--ranger/core/runner.py2
5 files changed, 8 insertions, 8 deletions
diff --git a/ranger/container/directory.py b/ranger/container/directory.py
index 4ffd9bc2..a9d33c7d 100644
--- a/ranger/container/directory.py
+++ b/ranger/container/directory.py
@@ -174,7 +174,7 @@ class Directory(FileSystemObject, Accumulator, Loadable):
     def mark_item(self, item, val):
         item._mark(val)
         if val:
-            if item in self.files and not item in self.marked_items:
+            if item in self.files and item not in self.marked_items:
                 self.marked_items.append(item)
         else:
             while True:
diff --git a/ranger/container/settings.py b/ranger/container/settings.py
index de39c013..23f3bad0 100644
--- a/ranger/container/settings.py
+++ b/ranger/container/settings.py
@@ -219,7 +219,7 @@ class Settings(SignalDispatcher, FileManagerAware):
 
     def _raw_set(self, name, value, path=None, tags=None):
         if path:
-            if not path in self._localsettings:
+            if path not in self._localsettings:
                 try:
                     regex = re.compile(path)
                 except:
@@ -231,7 +231,7 @@ class Settings(SignalDispatcher, FileManagerAware):
 
             # make sure name is in _settings, so __iter__ runs through
             # local settings too.
-            if not name in self._settings:
+            if name not in self._settings:
                 type_ = self.types_of(name)[0]
                 value = DEFAULT_VALUES[type_]
                 self._settings[name] = value
diff --git a/ranger/core/actions.py b/ranger/core/actions.py
index 642eec04..c35af9ab 100644
--- a/ranger/core/actions.py
+++ b/ranger/core/actions.py
@@ -1082,7 +1082,7 @@ class Actions(FileManagerAware, SettingsAware):
         if self.restorable_tabs:
             tab = self.restorable_tabs.pop()
             for name in range(1, len(self.tabs) + 2):
-                if not name in self.tabs:
+                if name not in self.tabs:
                     self.current_tab = name
                     self.tabs[name] = tab
                     tab.enter_dir(tab.path, history=False)
@@ -1106,7 +1106,7 @@ class Actions(FileManagerAware, SettingsAware):
         if narg:
             return self.tab_open(narg, path)
         for i in range(1, 10):
-            if not i in self.tabs:
+            if i not in self.tabs:
                 return self.tab_open(i, path)
 
     def tab_switch(self, path, create_directory=False):
diff --git a/ranger/core/main.py b/ranger/core/main.py
index fed4a231..0b894243 100644
--- a/ranger/core/main.py
+++ b/ranger/core/main.py
@@ -29,7 +29,7 @@ def main():
     else:
         os.environ[level] = '1'
 
-    if not 'SHELL' in os.environ:
+    if 'SHELL' not in os.environ:
         os.environ['SHELL'] = 'sh'
 
     ranger.arg = arg = parse_arguments()
@@ -354,7 +354,7 @@ def allow_access_to_confdir(confdir, allow):
                 print("To run ranger without the need for configuration")
                 print("files, use the --clean option.")
                 raise SystemExit()
-        if not confdir in sys.path:
+        if confdir not in sys.path:
             sys.path[0:0] = [confdir]
     else:
         if sys.path[0] == confdir:
diff --git a/ranger/core/runner.py b/ranger/core/runner.py
index 0ae227a6..0ffa6938 100644
--- a/ranger/core/runner.py
+++ b/ranger/core/runner.py
@@ -146,7 +146,7 @@ class Runner(object):
         # Set default shell for Popen
         if popen_kws['shell']:
             # This doesn't work with fish, see #300
-            if not 'fish' in os.environ['SHELL']:
+            if 'fish' not in os.environ['SHELL']:
                 popen_kws['executable'] = os.environ['SHELL']
 
         if 'stdout' not in popen_kws: