From e52629c1c70f91ac117e488e04a73bf9e91ab8f9 Mon Sep 17 00:00:00 2001 From: nfnty Date: Fri, 23 Dec 2016 10:49:25 +0100 Subject: linting: Python 2 compat: Import from `__future__` --- examples/plugin_chmod_keybindings.py | 2 ++ examples/plugin_file_filter.py | 3 +++ examples/plugin_hello_world.py | 2 ++ examples/plugin_ipc.py | 2 ++ examples/plugin_linemode.py | 2 ++ examples/plugin_new_macro.py | 2 ++ examples/plugin_new_sorting_method.py | 2 ++ examples/plugin_pmount.py | 2 ++ 8 files changed, 17 insertions(+) (limited to 'examples') diff --git a/examples/plugin_chmod_keybindings.py b/examples/plugin_chmod_keybindings.py index 72e90121..faab2345 100644 --- a/examples/plugin_chmod_keybindings.py +++ b/examples/plugin_chmod_keybindings.py @@ -4,6 +4,8 @@ # It could replace the ten lines in the rc.conf that create the key bindings # for the "chmod" command. +from __future__ import (absolute_import, print_function) + import ranger.api diff --git a/examples/plugin_file_filter.py b/examples/plugin_file_filter.py index aece68f8..27afd551 100644 --- a/examples/plugin_file_filter.py +++ b/examples/plugin_file_filter.py @@ -4,6 +4,9 @@ # the "show_hidden" option is activated. # Save the original filter function + +from __future__ import (absolute_import, print_function) + import ranger.container.directory diff --git a/examples/plugin_hello_world.py b/examples/plugin_hello_world.py index dc4c3fee..b1451be1 100644 --- a/examples/plugin_hello_world.py +++ b/examples/plugin_hello_world.py @@ -3,6 +3,8 @@ # This is a sample plugin that displays "Hello World" in ranger's console after # it started. +from __future__ import (absolute_import, print_function) + # We are going to extend the hook "ranger.api.hook_ready", so first we need # to import ranger.api: import ranger.api diff --git a/examples/plugin_ipc.py b/examples/plugin_ipc.py index ef87c3c5..99637272 100644 --- a/examples/plugin_ipc.py +++ b/examples/plugin_ipc.py @@ -7,6 +7,8 @@ # Example: # $ echo tab_new ~/images > /tmp/ranger-ipc.1234 +from __future__ import (absolute_import, print_function) + import ranger.api diff --git a/examples/plugin_linemode.py b/examples/plugin_linemode.py index febde8f1..84cc57cc 100644 --- a/examples/plugin_linemode.py +++ b/examples/plugin_linemode.py @@ -5,6 +5,8 @@ # the linemode by typing ":linemode rot13" in ranger. Type Mf to restore # the default linemode. +from __future__ import (absolute_import, print_function) + import codecs import ranger.api diff --git a/examples/plugin_new_macro.py b/examples/plugin_new_macro.py index 1c69b841..0e44cdd3 100644 --- a/examples/plugin_new_macro.py +++ b/examples/plugin_new_macro.py @@ -4,6 +4,8 @@ # date in commands that allow macros. You can test it with the command # ":shell echo %date; read" +from __future__ import (absolute_import, print_function) + import time import ranger.core.actions diff --git a/examples/plugin_new_sorting_method.py b/examples/plugin_new_sorting_method.py index 2dd50257..fefeaad9 100644 --- a/examples/plugin_new_sorting_method.py +++ b/examples/plugin_new_sorting_method.py @@ -3,6 +3,8 @@ # This plugin adds the sorting algorithm called 'random'. To enable it, type # ":set sort=random" or create a key binding with ":map oz set sort=random" +from __future__ import (absolute_import, print_function) + from random import random from ranger.container.directory import Directory diff --git a/examples/plugin_pmount.py b/examples/plugin_pmount.py index 6cd325f7..5db85385 100644 --- a/examples/plugin_pmount.py +++ b/examples/plugin_pmount.py @@ -9,6 +9,8 @@ # alt+shift+m : unmount /dev/sd # alt+shift+n : list the devices +from __future__ import (absolute_import, print_function) + import ranger.api MOUNT_KEY = 'm' -- cgit 1.4.1-2-gfad0