summary refs log tree commit diff stats
path: root/ranger
diff options
context:
space:
mode:
authortoonn <toonn@toonn.io>2018-04-21 19:17:46 +0200
committertoonn <toonn@toonn.io>2018-04-21 19:17:46 +0200
commitb1d93d5cfc8338a429d7af0b685199c0b0315854 (patch)
tree4fb9156fb6c56ab0509859da494178ec07f8e624 /ranger
parenta30b5e5b517a04f35e79a41a624aaedf187f6a36 (diff)
downloadranger-b1d93d5cfc8338a429d7af0b685199c0b0315854.tar.gz
MISSION CRITICAL update to adhere to pep8
Pep8 was changed to recommend breaking lines *before* rather than after
binary operators. This patch makes everything right with the universe.

Fixes #1145
Diffstat (limited to 'ranger')
-rw-r--r--ranger/container/directory.py5
-rw-r--r--ranger/core/main.py4
-rw-r--r--ranger/ext/direction.py4
-rw-r--r--ranger/ext/img_display.py16
-rw-r--r--ranger/gui/widgets/browsercolumn.py4
-rw-r--r--ranger/gui/widgets/view_base.py4
6 files changed, 19 insertions, 18 deletions
diff --git a/ranger/container/directory.py b/ranger/container/directory.py
index 18b1687c..e281e6c9 100644
--- a/ranger/container/directory.py
+++ b/ranger/container/directory.py
@@ -338,8 +338,9 @@ class Directory(  # pylint: disable=too-many-instance-attributes,too-many-public
                         dirlist = [
                             os.path.join("/", dirpath, d)
                             for d in dirnames
-                            if self.flat == -1 or
-                            (dirpath.count(os.path.sep) - mypath.count(os.path.sep)) <= self.flat
+                            if self.flat == -1
+                            or (dirpath.count(os.path.sep)
+                                - mypath.count(os.path.sep)) <= self.flat
                         ]
                         filelist += dirlist
                         filelist += [os.path.join("/", dirpath, f) for f in filenames]
diff --git a/ranger/core/main.py b/ranger/core/main.py
index 4adea918..9a7a554d 100644
--- a/ranger/core/main.py
+++ b/ranger/core/main.py
@@ -397,8 +397,8 @@ def load_settings(  # pylint: disable=too-many-locals,too-many-branches,too-many
         default_conf = fm.relpath('config', 'rc.conf')
 
         custom_conf_is_readable = os.access(custom_conf, os.R_OK)
-        if (os.environ.get('RANGER_LOAD_DEFAULT_RC', 'TRUE').upper() != 'FALSE' or
-                not custom_conf_is_readable):
+        if (os.environ.get('RANGER_LOAD_DEFAULT_RC', 'TRUE').upper() != 'FALSE'
+                or not custom_conf_is_readable):
             fm.source(default_conf)
         if custom_conf_is_readable:
             fm.source(custom_conf)
diff --git a/ranger/ext/direction.py b/ranger/ext/direction.py
index 7df45556..33ebb604 100644
--- a/ranger/ext/direction.py
+++ b/ranger/ext/direction.py
@@ -97,8 +97,8 @@ class Direction(dict):
         return self.get('cycle') in (True, 'true', 'on', 'yes')
 
     def one_indexed(self):
-        return ('one_indexed' in self and
-                self.get('one_indexed') in (True, 'true', 'on', 'yes'))
+        return ('one_indexed' in self
+                and self.get('one_indexed') in (True, 'true', 'on', 'yes'))
 
     def multiply(self, n):
         for key in ('up', 'right', 'down', 'left'):
diff --git a/ranger/ext/img_display.py b/ranger/ext/img_display.py
index 67941e27..78d71cb2 100644
--- a/ranger/ext/img_display.py
+++ b/ranger/ext/img_display.py
@@ -434,20 +434,20 @@ class URXVTImageDisplayer(ImageDisplayer, FileManagerAware):
         pct_width, pct_height = self._get_sizes()
 
         sys.stdout.write(
-            self.display_protocol +
-            path +
-            ";{pct_width}x{pct_height}+{pct_x}+{pct_y}:op=keep-aspect".format(
+            self.display_protocol
+            + path
+            + ";{pct_width}x{pct_height}+{pct_x}+{pct_y}:op=keep-aspect".format(
                 pct_width=pct_width, pct_height=pct_height, pct_x=pct_x, pct_y=pct_y
-            ) +
-            self.close_protocol
+            )
+            + self.close_protocol
         )
         sys.stdout.flush()
 
     def clear(self, start_x, start_y, width, height):
         sys.stdout.write(
-            self.display_protocol +
-            ";100x100+1000+1000" +
-            self.close_protocol
+            self.display_protocol
+            + ";100x100+1000+1000"
+            + self.close_protocol
         )
         sys.stdout.flush()
 
diff --git a/ranger/gui/widgets/browsercolumn.py b/ranger/gui/widgets/browsercolumn.py
index b3272cbc..cf322409 100644
--- a/ranger/gui/widgets/browsercolumn.py
+++ b/ranger/gui/widgets/browsercolumn.py
@@ -318,8 +318,8 @@ class BrowserColumn(Pager):  # pylint: disable=too-many-instance-attributes
 
             text = current_linemode.filetitle(drawn, metadata)
 
-            if drawn.marked and (self.main_column or
-                                 self.settings.display_tags_in_all_columns):
+            if drawn.marked and (self.main_column
+                                 or self.settings.display_tags_in_all_columns):
                 text = " " + text
 
             # Computing predisplay data. predisplay contains a list of lists
diff --git a/ranger/gui/widgets/view_base.py b/ranger/gui/widgets/view_base.py
index 80061004..4493443e 100644
--- a/ranger/gui/widgets/view_base.py
+++ b/ranger/gui/widgets/view_base.py
@@ -72,8 +72,8 @@ class ViewBase(Widget, DisplayableContainer):  # pylint: disable=too-many-instan
         sorted_bookmarks = sorted(
             (
                 item for item in self.fm.bookmarks
-                if self.fm.settings.show_hidden_bookmarks or
-                '/.' not in item[1].path
+                if self.fm.settings.show_hidden_bookmarks
+                or '/.' not in item[1].path
             ),
             key=lambda t: t[0].lower(),
         )