From ab41c7766ced3f1b8f6b4ed317f0db4e0d71b897 Mon Sep 17 00:00:00 2001 From: stepshal Date: Thu, 16 Jun 2016 18:22:57 +0700 Subject: Add two blank lines where is expected --- examples/plugin_chmod_keybindings.py | 1 + examples/plugin_file_filter.py | 2 ++ examples/plugin_hello_world.py | 2 ++ examples/plugin_ipc.py | 2 ++ examples/plugin_linemode.py | 1 + examples/plugin_new_macro.py | 2 ++ examples/plugin_pmount.py | 2 ++ 7 files changed, 12 insertions(+) (limited to 'examples') diff --git a/examples/plugin_chmod_keybindings.py b/examples/plugin_chmod_keybindings.py index 1c9558f7..63f42b0e 100644 --- a/examples/plugin_chmod_keybindings.py +++ b/examples/plugin_chmod_keybindings.py @@ -7,6 +7,7 @@ import ranger.api old_hook_init = ranger.api.hook_init + def hook_init(fm): old_hook_init(fm) diff --git a/examples/plugin_file_filter.py b/examples/plugin_file_filter.py index d5ea2d2d..5d5f1466 100644 --- a/examples/plugin_file_filter.py +++ b/examples/plugin_file_filter.py @@ -10,6 +10,8 @@ old_accept_file = ranger.container.directory.accept_file HIDE_FILES = ("/boot", "/sbin", "/proc", "/sys") # Define a new one + + def custom_accept_file(file, filters): if not file.fm.settings.show_hidden and file.path in HIDE_FILES: return False diff --git a/examples/plugin_hello_world.py b/examples/plugin_hello_world.py index b64916d4..0158a653 100644 --- a/examples/plugin_hello_world.py +++ b/examples/plugin_hello_world.py @@ -12,6 +12,8 @@ import ranger.api old_hook_ready = ranger.api.hook_ready # Create a replacement for the hook that... + + def hook_ready(fm): # ...does the desired action... fm.notify("Hello World") diff --git a/examples/plugin_ipc.py b/examples/plugin_ipc.py index a9e79205..cda10c59 100644 --- a/examples/plugin_ipc.py +++ b/examples/plugin_ipc.py @@ -10,6 +10,8 @@ import ranger.api old_hook_init = ranger.api.hook_init + + def hook_init(fm): try: # Create a FIFO. diff --git a/examples/plugin_linemode.py b/examples/plugin_linemode.py index 8a92552e..c05ff567 100644 --- a/examples/plugin_linemode.py +++ b/examples/plugin_linemode.py @@ -9,6 +9,7 @@ import codecs import ranger.api from ranger.core.linemode import LinemodeBase + @ranger.api.register_linemode class MyLinemode(LinemodeBase): name = "rot13" diff --git a/examples/plugin_new_macro.py b/examples/plugin_new_macro.py index 31350387..8dbe435d 100644 --- a/examples/plugin_new_macro.py +++ b/examples/plugin_new_macro.py @@ -10,6 +10,8 @@ old_get_macros = ranger.core.actions.Actions._get_macros # Define a new macro function import time + + def get_macros_with_date(self): macros = old_get_macros(self) macros['date'] = time.strftime('%m/%d/%Y') diff --git a/examples/plugin_pmount.py b/examples/plugin_pmount.py index 61ee0dbd..ba61b0e5 100644 --- a/examples/plugin_pmount.py +++ b/examples/plugin_pmount.py @@ -16,6 +16,8 @@ UMOUNT_KEY = 'M' LIST_MOUNTS_KEY = 'N' old_hook_init = ranger.api.hook_init + + def hook_init(fm): try: fm.execute_console("map {key} shell -p lsblk".format(key=LIST_MOUNTS_KEY)) -- cgit 1.4.1-2-gfad0