diff options
author | bors-servo <metajack+bors@gmail.com> | 2015-08-25 11:29:56 -0600 |
---|---|---|
committer | bors-servo <metajack+bors@gmail.com> | 2015-08-25 11:29:56 -0600 |
commit | 121110a52a549b44e65aa4ba0669bd75702588ea (patch) | |
tree | a5c78ef49bf44c7e26775af876406535686bdfd3 /python | |
parent | f79220f1a8bcb47d8248356f303c7b3673322905 (diff) | |
parent | 63851f2650dc3491ca81e2d478e58242e6e63561 (diff) | |
download | servo-121110a52a549b44e65aa4ba0669bd75702588ea.tar.gz servo-121110a52a549b44e65aa4ba0669bd75702588ea.zip |
Auto merge of #7362 - wilmoz:ForbidMultilineImports, r=jdm
Forbid multiline imports
https://github.com/servo/servo/issues/7356
Diffstat (limited to 'python')
-rw-r--r-- | python/tidy.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/python/tidy.py b/python/tidy.py index 88e86d68502..43ff23aeff5 100644 --- a/python/tidy.py +++ b/python/tidy.py @@ -246,8 +246,7 @@ def check_rust(file_name, contents): # imports must be in the same line and alphabetically sorted if line.startswith("use "): use = line[4:] - match = use.find('{') - if match >= 0 and "}" not in use[match:]: + if not use.endswith(";"): yield (idx + 1, "use statement spans multiple lines") uses.append(use[:len(use) - 1]) elif len(uses) > 0: |