pep8 fixes, modernizations
autopep8 -a -r -i --select E711,E712,W601,W602,W603,W604,W690,E304,E401,E502 . Also includes some manual reindentations (many are left after the print() changes). Manually checked, some modernizations not commited here.
This commit is contained in:
parent
e2ac8687c6
commit
6161a0aacd
18 changed files with 57 additions and 51 deletions
|
|
@ -2,9 +2,9 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
from __future__ import print_function
|
||||
|
||||
import os
|
||||
import subprocess
|
||||
import sys
|
||||
import os
|
||||
|
||||
if '--deps' in sys.argv:
|
||||
sys.argv.remove('--deps')
|
||||
|
|
@ -25,8 +25,8 @@ if len(sys.argv) < 2:
|
|||
print("To install all the missing dependencies, add the option --deps")
|
||||
print("at the end of the command line.")
|
||||
print()
|
||||
print("Error: Please provide a destination, " \
|
||||
"for example ‘%s/bin’" % os.getenv('HOME'), file=sys.stderr)
|
||||
print("Error: Please provide a destination, "
|
||||
"for example ‘%s/bin’" % os.getenv('HOME'), file=sys.stderr)
|
||||
sys.exit(1)
|
||||
else:
|
||||
dest = os.path.expanduser(sys.argv[1])
|
||||
|
|
|
|||
|
|
@ -2,6 +2,17 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
from __future__ import print_function
|
||||
|
||||
import imp
|
||||
import inspect
|
||||
import optparse
|
||||
import os
|
||||
import re
|
||||
import sys
|
||||
import tempfile
|
||||
import time
|
||||
|
||||
from weboob.tools.application.base import Application
|
||||
|
||||
# Copyright(C) 2010-2011 Laurent Bachelier
|
||||
#
|
||||
# This file is part of weboob.
|
||||
|
|
@ -19,16 +30,6 @@ from __future__ import print_function
|
|||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with weboob. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
import sys
|
||||
import os
|
||||
import tempfile
|
||||
import imp
|
||||
import inspect
|
||||
import optparse
|
||||
import re
|
||||
import time
|
||||
|
||||
from weboob.tools.application.base import Application
|
||||
|
||||
BASE_PATH = os.path.join(os.path.dirname(__file__), os.pardir)
|
||||
DEST_DIR = 'man'
|
||||
|
|
@ -121,8 +122,8 @@ def main():
|
|||
try:
|
||||
script = imp.load_module("scripts.%s" % fname, f, tmpfile, desc)
|
||||
except ImportError as e:
|
||||
print("Unable to load the %s script (%s)" \
|
||||
% (fname, e), file=sys.stderr)
|
||||
print("Unable to load the %s script (%s)"
|
||||
% (fname, e), file=sys.stderr)
|
||||
else:
|
||||
print("Loaded %s" % fname)
|
||||
# Find the applications we can handle
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue