diff options
Diffstat (limited to 'python/tidy.py')
-rw-r--r-- | python/tidy.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/python/tidy.py b/python/tidy.py index 6110a9ea4eb..e12eeb33e49 100644 --- a/python/tidy.py +++ b/python/tidy.py @@ -69,6 +69,8 @@ ignored_dirs = [ os.path.join(".", "."), ] +spec_base_path = "components/script/dom/" + def is_iter_empty(iterator): try: @@ -221,7 +223,7 @@ def check_lock(file_name, contents): raise StopIteration # package names to be neglected (as named by cargo) - exceptions = ["bitflags", "xml-rs", "byteorder"] + exceptions = ["bitflags", "xml-rs"] import toml content = toml.loads(contents) @@ -525,10 +527,9 @@ def check_json(filename, contents): def check_spec(file_name, lines): - base_path = "components/script/dom/" - if base_path not in file_name: + if spec_base_path not in file_name: raise StopIteration - file_name = os.path.relpath(os.path.splitext(file_name)[0], base_path) + file_name = os.path.relpath(os.path.splitext(file_name)[0], spec_base_path) patt = re.compile("^\s*\/\/.+") # Pattern representing a line with a macro |