From 916c239014b95f02bf045f8de0488d7614126edf Mon Sep 17 00:00:00 2001 From: nfnty Date: Fri, 23 Dec 2016 11:25:10 +0100 Subject: linting: Python 2 compat --- examples/plugin_file_filter.py | 6 +++--- examples/plugin_linemode.py | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'examples') diff --git a/examples/plugin_file_filter.py b/examples/plugin_file_filter.py index 486e59d9..aece68f8 100644 --- a/examples/plugin_file_filter.py +++ b/examples/plugin_file_filter.py @@ -13,11 +13,11 @@ 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: +def custom_accept_file(fobj, filters): + if not fobj.fm.settings.show_hidden and fobj.path in HIDE_FILES: return False else: - return ACCEPT_FILE_OLD(file, filters) + return ACCEPT_FILE_OLD(fobj, filters) # Overwrite the old function diff --git a/examples/plugin_linemode.py b/examples/plugin_linemode.py index 6f16743d..febde8f1 100644 --- a/examples/plugin_linemode.py +++ b/examples/plugin_linemode.py @@ -15,8 +15,8 @@ from ranger.core.linemode import LinemodeBase class MyLinemode(LinemodeBase): name = "rot13" - def filetitle(self, file, metadata): - return codecs.encode(file.relative_path, "rot_13") + def filetitle(self, fobj, metadata): + return codecs.encode(fobj.relative_path, "rot_13") - def infostring(self, file, metadata): + def infostring(self, fobj, metadata): raise NotImplementedError -- cgit 1.4.1-2-gfad0