Backslash continuation removal (Nova folsom-2)
Fixes bug #938588 Backslash continuations removal for scripts in bin/, plugin/, and etc. Change-Id: Idd17048b6e8db6e939946968e011e68da8585b8d
This commit is contained in:
@@ -48,8 +48,8 @@ VERBOSE_MISSING_IMPORT = False
|
||||
|
||||
|
||||
def is_import_exception(mod):
|
||||
return mod in IMPORT_EXCEPTIONS or \
|
||||
any(mod.startswith(m + '.') for m in IMPORT_EXCEPTIONS)
|
||||
return (mod in IMPORT_EXCEPTIONS or
|
||||
any(mod.startswith(m + '.') for m in IMPORT_EXCEPTIONS))
|
||||
|
||||
|
||||
def import_normalize(line):
|
||||
@@ -114,9 +114,9 @@ def nova_one_import_per_line(logical_line):
|
||||
"""
|
||||
pos = logical_line.find(',')
|
||||
parts = logical_line.split()
|
||||
if pos > -1 and (parts[0] == "import" or
|
||||
parts[0] == "from" and parts[2] == "import") and \
|
||||
not is_import_exception(parts[1]):
|
||||
if (pos > -1 and (parts[0] == "import" or
|
||||
parts[0] == "from" and parts[2] == "import") and
|
||||
not is_import_exception(parts[1])):
|
||||
return pos, "NOVA N301: one import per line"
|
||||
|
||||
_missingImport = set([])
|
||||
|
||||
Reference in New Issue
Block a user