about summary refs log tree commit diff stats
path: root/ranger
diff options
context:
space:
mode:
authortoonn <toonn@toonn.io>2021-08-27 20:17:31 +0200
committertoonn <toonn@toonn.io>2021-08-27 20:17:31 +0200
commitb327adc7382f5253d2387d55b96b6296ff3961e6 (patch)
tree05e90d3a68e87a191aac3e9dfbc2d881c2332fa5 /ranger
parentae524006f419a029c604861bdb36aa472535bd2a (diff)
downloadranger-b327adc7382f5253d2387d55b96b6296ff3961e6.tar.gz
open23: Workaround Pylint bug
Diffstat (limited to 'ranger')
-rw-r--r--ranger/ext/open23.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/ranger/ext/open23.py b/ranger/ext/open23.py
index d5320fa3..912f9829 100644
--- a/ranger/ext/open23.py
+++ b/ranger/ext/open23.py
@@ -14,7 +14,9 @@ from ranger import PY3
 #         contextmanager hides away the lack of an errors keyword argument for
 #         python 2 and is now preferred. This can be safely dropped once we
 #         ditch python 2 support.
-# pylint: disable=too-many-arguments
+# TODO: The unspecified-encoding lint should only be disabled for the Python 2
+#       case but Pylint is failing to parse the second disable properly.
+# pylint: disable=too-many-arguments,unspecified-encoding
 @contextmanager
 def open23(
     file,
@@ -39,10 +41,8 @@ def open23(
         )
     else:
         if buffering is None:
-            # pylint: disable=unspecified-encoding
             fobj = open(name=file, mode=mode)
         else:
-            # pylint: disable=unspecified-encoding
             fobj = open(name=file, mode=mode, buffering=buffering)
     try:
         yield fobj