about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authortoonn <toonn@toonn.io>2022-02-05 19:29:50 +0100
committertoonn <toonn@toonn.io>2022-02-05 19:29:50 +0100
commit9cd7ca98e324dd90cd7b650853f4f3ba22d9677b (patch)
tree894bf33a3261a6f78e06e5b408fa5d1028762a53
parent71e23b227e8b018968b927a9e9f1837c4b4234ff (diff)
downloadranger-9cd7ca98e324dd90cd7b650853f4f3ba22d9677b.tar.gz
Revert "actions: Drop disappeared Pylint options"
This reverts commit 3f5cae584e56ca47e7460dd2634d0b10b3787a9d.
-rw-r--r--ranger/core/actions.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/ranger/core/actions.py b/ranger/core/actions.py
index 6cbc9ef7..a552e328 100644
--- a/ranger/core/actions.py
+++ b/ranger/core/actions.py
@@ -372,6 +372,7 @@ class Actions(  # pylint: disable=too-many-instance-attributes,too-many-public-m
         """
         filename = os.path.expanduser(filename)
         LOG.debug("Sourcing config file '%s'", filename)
+        # pylint: disable=unspecified-encoding
         with open(filename, 'r', encoding="utf-8") as fobj:
             for line in fobj:
                 line = line.strip(" \r\n")
@@ -1053,6 +1054,7 @@ class Actions(  # pylint: disable=too-many-instance-attributes,too-many-public-m
                 # XXX: properly determine file's encoding
                 # Disable the lint because the preview is read outside the
                 # local scope.
+                # pylint: disable=consider-using-with
                 return codecs.open(path, 'r', errors='ignore')
             # IOError for Python2, OSError for Python3
             except (IOError, OSError):
@@ -1438,6 +1440,7 @@ class Actions(  # pylint: disable=too-many-instance-attributes,too-many-public-m
             contexts = 'browser', 'console', 'pager', 'taskview'
 
         # Disable lint because TemporaryFiles are removed on close
+        # pylint: disable=consider-using-with
         temporary_file = tempfile.NamedTemporaryFile()
 
         def write(string):  # pylint: disable=redefined-outer-name
@@ -1464,6 +1467,7 @@ class Actions(  # pylint: disable=too-many-instance-attributes,too-many-public-m
 
     def dump_commands(self):
         # Disable lint because TemporaryFiles are removed on close
+        # pylint: disable=consider-using-with
         temporary_file = tempfile.NamedTemporaryFile()
 
         def write(string):  # pylint: disable=redefined-outer-name
@@ -1490,6 +1494,7 @@ class Actions(  # pylint: disable=too-many-instance-attributes,too-many-public-m
 
     def dump_settings(self):
         # Disable lint because TemporaryFiles are removed on close
+        # pylint: disable=consider-using-with
         temporary_file = tempfile.NamedTemporaryFile()
 
         def write(string):  # pylint: disable=redefined-outer-name