summary refs log tree commit diff stats
path: root/examples/plugin_hello_world.py
diff options
context:
space:
mode:
authornfnty <git@nfnty.se>2016-12-21 05:06:55 +0100
committernfnty <git@nfnty.se>2017-01-17 05:59:02 +0100
commitb3d031a913814900467358b2adf20a148bf6de1a (patch)
tree6f5b435817ec9cbe850fb73485a7e6c77da28c14 /examples/plugin_hello_world.py
parent76791a70467d7223a966aa9f12f5583b01d704a8 (diff)
downloadranger-b3d031a913814900467358b2adf20a148bf6de1a.tar.gz
linting: pylint and flake8
Diffstat (limited to 'examples/plugin_hello_world.py')
-rw-r--r--examples/plugin_hello_world.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/examples/plugin_hello_world.py b/examples/plugin_hello_world.py
index 0158a653..dc4c3fee 100644
--- a/examples/plugin_hello_world.py
+++ b/examples/plugin_hello_world.py
@@ -9,7 +9,7 @@ import ranger.api
 
 # Save the previously existing hook, because maybe another module already
 # extended that hook and we don't want to lose it:
-old_hook_ready = ranger.api.hook_ready
+HOOK_READY_OLD = ranger.api.hook_ready
 
 # Create a replacement for the hook that...
 
@@ -19,7 +19,8 @@ def hook_ready(fm):
     fm.notify("Hello World")
     # ...and calls the saved hook.  If you don't care about the return value,
     # simply return the return value of the previous hook to be safe.
-    return old_hook_ready(fm)
+    return HOOK_READY_OLD(fm)
+
 
 # Finally, "monkey patch" the existing hook_ready function with our replacement:
 ranger.api.hook_ready = hook_ready