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__` --- ranger.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'ranger.py') diff --git a/ranger.py b/ranger.py index f8c00213..3aa62eec 100755 --- a/ranger.py +++ b/ranger.py @@ -20,10 +20,12 @@ if [ "$(cat -- "$tempfile")" != "$(echo -n `pwd`)" ]; then fi rm -f -- "$tempfile" return $returnvalue -""" and None # pylint: disable=pointless-statement +""" -import sys # NOQA pylint: disable=wrong-import-position -from os.path import exists, abspath # NOQA pylint: disable=wrong-import-position +from __future__ import (absolute_import, print_function) + +import sys +from os.path import exists, abspath # Need to find out whether or not the flag --clean was used ASAP, # because --clean is supposed to disable bytecode compilation @@ -35,5 +37,5 @@ if __file__[:4] == '/usr' and exists('ranger') and abspath('.') in sys.path: sys.path.remove(abspath('.')) # Start ranger -import ranger # NOQA pylint: disable=wrong-import-position,import-self +import ranger # NOQA pylint: disable=import-self,wrong-import-position sys.exit(ranger.main()) # pylint: disable=no-member -- cgit 1.4.1-2-gfad0