about summary refs log tree commit diff stats
path: root/ranger
diff options
context:
space:
mode:
authortoonn <toonn@toonn.io>2020-01-18 16:18:17 +0100
committertoonn <toonn@toonn.io>2020-07-05 15:23:44 +0200
commitfc3b912db825a0aa4adee42e592b378cf37a87c3 (patch)
treeed3564c81605c7bb125c41f038741afc509fc76e /ranger
parentff26da5bff67f07d5614bb926ac3de7ea2aad034 (diff)
downloadranger-fc3b912db825a0aa4adee42e592b378cf37a87c3.tar.gz
Possible bug caught in review
Forgot to cast the `programs` generator to a list when dropping the
unnecessary continuation.

Miscellaneous alignment fixes.
Diffstat (limited to 'ranger')
-rwxr-xr-xranger/config/commands.py7
-rw-r--r--ranger/core/actions.py3
-rw-r--r--ranger/ext/vcs/vcs.py4
3 files changed, 9 insertions, 5 deletions
diff --git a/ranger/config/commands.py b/ranger/config/commands.py
index f7695d58..b7b02e73 100755
--- a/ranger/config/commands.py
+++ b/ranger/config/commands.py
@@ -337,8 +337,11 @@ class open_with(Command):
 
     def execute(self):
         app, flags, mode = self._get_app_flags_mode(self.rest(1))
-        self.fm.execute_file(files=self.fm.thistab.get_selection(),
-                             app=app, flags=flags, mode=mode)
+        self.fm.execute_file(
+            files=self.fm.thistab.get_selection(),
+            app=app,
+            flags=flags,
+            mode=mode)
 
     def tab(self, tabnum):
         return self._tab_through_executables()
diff --git a/ranger/core/actions.py b/ranger/core/actions.py
index afa9a77a..c42312ce 100644
--- a/ranger/core/actions.py
+++ b/ranger/core/actions.py
@@ -931,7 +931,8 @@ class Actions(  # pylint: disable=too-many-instance-attributes,too-many-public-m
         except IndexError:
             self.ui.browser.draw_info = []
             return
-        programs = self.rifle.list_commands([target.path], None, skip_ask=True)
+        programs = list(self.rifle.list_commands(
+            [target.path], None, skip_ask=True))
         if programs:
             num_digits = max((len(str(program[0])) for program in programs))
             program_info = ['%s | %s' % (str(program[0]).rjust(num_digits), program[1])
diff --git a/ranger/ext/vcs/vcs.py b/ranger/ext/vcs/vcs.py
index e0f83da9..bd744458 100644
--- a/ranger/ext/vcs/vcs.py
+++ b/ranger/ext/vcs/vcs.py
@@ -77,8 +77,8 @@ class Vcs(object):  # pylint: disable=too-many-instance-attributes
 
         self.root, self.repodir, self.repotype, self.links = self._find_root(self.path)
         self.is_root = self.obj.path == self.root
-        self.is_root_link = (self.obj.is_link
-                             and self.obj.realpath == self.root)
+        self.is_root_link = (
+            self.obj.is_link and self.obj.realpath == self.root)
         self.is_root_pointer = self.is_root or self.is_root_link
         self.in_repodir = False
         self.rootvcs = None