many pep8 improvements
This commit is contained in:
1 parent
b716df1a05
commit
4b2ba185ae
117 files changed
+7160
-5670
No files matched your search
+7
-7
@@ -69,10 +69,10 @@ base_modules = ['aifc', 'anydbm', 'array', 'asynchat', 'asyncore', 'atexit',
|
||||
contributed_modules = []
|
||||
for root, dirs, files in os.walk('gluon'):
|
||||
for candidate in ['.'.join(
|
||||
os.path.join(root, os.path.splitext(name)[0]).split(os.sep))
|
||||
for name in files if name.endswith('.py')
|
||||
and root.split(os.sep) != ['gluon', 'tests']
|
||||
]:
|
||||
os.path.join(root, os.path.splitext(name)[0]).split(os.sep))
|
||||
for name in files if name.endswith('.py')
|
||||
and root.split(os.sep) != ['gluon', 'tests']
|
||||
]:
|
||||
contributed_modules.append(candidate)
|
||||
|
||||
# Python base version
|
||||
@@ -86,7 +86,7 @@ alert_dependency = ['hashlib', 'uuid']
|
||||
#
|
||||
# List of modules deprecated in Python 2.6 or 2.7 that are in the above set
|
||||
py26_deprecated = ['mhlib', 'multifile', 'mimify', 'sets', 'MimeWriter']
|
||||
py27_deprecated = [] # ['optparse'] but we need it for now
|
||||
py27_deprecated = [] # ['optparse'] but we need it for now
|
||||
|
||||
if python_version >= '2.6':
|
||||
base_modules += ['json', 'multiprocessing']
|
||||
@@ -99,11 +99,11 @@ if python_version >= '2.7':
|
||||
# Now iterate in the base_modules, trying to do the import
|
||||
for module in base_modules + contributed_modules:
|
||||
try:
|
||||
__import__(module, globals(), locals(), [])
|
||||
__import__(module, globals(), locals(), [])
|
||||
except:
|
||||
# Raise an exception if the current module is a dependency
|
||||
if module in alert_dependency:
|
||||
msg = "Missing dependency: %(module)s\n" % locals()
|
||||
msg += "Try the following command: "
|
||||
msg += "easy_install-%(python_version)s -U %(module)s" % locals()
|
||||
raise ImportError, msg
|
||||
raise ImportError(msg)
|
||||
Reference in new issue
Block a user