summary refs log tree commit diff stats
diff options
context:
space:
mode:
authornfnty <git@nfnty.se>2017-02-04 10:26:05 +0100
committernfnty <git@nfnty.se>2017-02-04 10:26:05 +0100
commit8e8493e93ec705b5296684d5884794dd446d9116 (patch)
treed9eafdc0389c3ba865d9b992c9c93016ed5f3e22
parent2597579f3b8a113aa0c00651516fbe1bb5241c72 (diff)
downloadranger-8e8493e93ec705b5296684d5884794dd446d9116.tar.gz
linting: pylint: Fix `literal-comparison`
-rw-r--r--ranger/api/commands.py2
-rw-r--r--ranger/gui/ui.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/ranger/api/commands.py b/ranger/api/commands.py
index 56fc94a3..f5011232 100644
--- a/ranger/api/commands.py
+++ b/ranger/api/commands.py
@@ -389,7 +389,7 @@ class FunctionCommand(Command):
         args, keywords = list(), dict()
         for arg in self.args[1:]:
             equal_sign = arg.find("=")
-            value = arg if (equal_sign is -1) else arg[equal_sign + 1:]
+            value = arg if equal_sign == -1 else arg[equal_sign + 1:]
             try:
                 value = int(value)
             except ValueError:
diff --git a/ranger/gui/ui.py b/ranger/gui/ui.py
index 0227bad4..5d53603f 100644
--- a/ranger/gui/ui.py
+++ b/ranger/gui/ui.py
@@ -243,7 +243,7 @@ class UI(  # pylint: disable=too-many-instance-attributes,too-many-public-method
             self.set_load_mode(True)
             for _ in range(4):
                 getkey = self.win.getch()
-                if getkey is not -1:
+                if getkey != -1:
                     keys.append(getkey)
             if len(keys) == 1:
                 keys.append(-1)