summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorWojciech Siewierski <wojciech.siewierski@onet.pl>2017-05-21 02:24:38 +0200
committerrandnobx <randynobx@gmail.com>2017-05-20 20:26:56 -0400
commit48db8b597814a1f94b3f99f86bf1e242fd8c7a5e (patch)
treefd61b499c693828e79507a52ea63bfc9301545d3
parent9a20699a86ae33fbf60182de4d73d1d457817233 (diff)
downloadranger-48db8b597814a1f94b3f99f86bf1e242fd8c7a5e.tar.gz
Resolve the pylint warnings
Fix one typo too.
-rw-r--r--ranger/container/directory.py17
1 files changed, 10 insertions, 7 deletions
diff --git a/ranger/container/directory.py b/ranger/container/directory.py
index 5bc822c4..4b067d35 100644
--- a/ranger/container/directory.py
+++ b/ranger/container/directory.py
@@ -92,15 +92,15 @@ def mtimelevel(path, level):
         mtime = max(mtime, max([-1] + [os.stat(d).st_mtime for d in dirlist]))
     return mtime
 
-class InodeFilterConstants(object):
+
+class InodeFilterConstants(object):  # pylint: disable=too-few-public-methods
     DIRS = 'd'
     FILES = 'f'
     LINKS = 'l'
 
+
 class Directory(  # pylint: disable=too-many-instance-attributes,too-many-public-methods
         FileSystemObject, Accumulator, Loadable):
-
-
     is_directory = True
     enterable = False
     load_generator = None
@@ -260,14 +260,17 @@ class Directory(  # pylint: disable=too-many-instance-attributes,too-many-public
             filters.append(hidden_filter_func)
         if self.settings.global_inode_type_filter or self.inode_type_filter:
             def inode_filter_func(obj):
-                # Use local inode_type_filter is present, global otherwise
+                # Use local inode_type_filter if present, global otherwise
                 inode_filter = self.inode_type_filter or self.settings.global_inode_type_filter
                 # Apply filter
-                if InodeFilterConstants.DIRS in inode_filter and obj.is_directory:
+                if InodeFilterConstants.DIRS in inode_filter and \
+                        obj.is_directory:
                     return True
-                elif InodeFilterConstants.FILES in inode_filter and obj.is_file and not obj.is_link:
+                elif InodeFilterConstants.FILES in inode_filter and \
+                        obj.is_file and not obj.is_link:
                     return True
-                elif InodeFilterConstants.LINKS in inode_filter and obj.is_link:
+                elif InodeFilterConstants.LINKS in inode_filter and \
+                        obj.is_link:
                     return True
                 return False
             filters.append(inode_filter_func)