From 61c5597a09945982f093412cd134850346b82e3b Mon Sep 17 00:00:00 2001 From: Zhongyue Luo Date: Wed, 16 May 2012 17:08:27 +0800 Subject: Backslash continuation removal (Nova folsom-2) Fixes bug #938588 Backslash continuations removal for scripts in bin/, plugin/, and etc. Change-Id: Idd17048b6e8db6e939946968e011e68da8585b8d --- tools/hacking.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'tools/hacking.py') diff --git a/tools/hacking.py b/tools/hacking.py index 7fea734b6..93e51e66c 100755 --- a/tools/hacking.py +++ b/tools/hacking.py @@ -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([]) -- cgit