summary refs log tree commit diff stats
path: root/examples
diff options
context:
space:
mode:
authornfnty <git@nfnty.se>2016-12-23 10:49:25 +0100
committernfnty <git@nfnty.se>2017-01-17 05:59:02 +0100
commite52629c1c70f91ac117e488e04a73bf9e91ab8f9 (patch)
treec92b5de625f7e5dc57ee1374531d14ac60222717 /examples
parent916c239014b95f02bf045f8de0488d7614126edf (diff)
downloadranger-e52629c1c70f91ac117e488e04a73bf9e91ab8f9.tar.gz
linting: Python 2 compat: Import from `__future__`
Diffstat (limited to 'examples')
-rw-r--r--examples/plugin_chmod_keybindings.py2
-rw-r--r--examples/plugin_file_filter.py3
-rw-r--r--examples/plugin_hello_world.py2
-rw-r--r--examples/plugin_ipc.py2
-rw-r--r--examples/plugin_linemode.py2
-rw-r--r--examples/plugin_new_macro.py2
-rw-r--r--examples/plugin_new_sorting_method.py2
-rw-r--r--examples/plugin_pmount.py2
8 files changed, 17 insertions, 0 deletions
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 <uppercase letter>         : unmount /dev/sd<letter>
 # alt+shift+n                            : list the devices
 
+from __future__ import (absolute_import, print_function)
+
 import ranger.api
 
 MOUNT_KEY = '<alt>m'