1
0
mirror of https://github.com/SquidDev-CC/CC-Tweaked synced 2024-09-29 15:30:48 +00:00

Skip the src/generated file in check-lines

This commit is contained in:
SquidDev 2020-04-22 10:07:43 +01:00
parent e5cc345f49
commit 4ed4a6409b

View File

@ -6,7 +6,8 @@ problems = False
exclude = [ "*.png", "**/data/json-parsing/*.json" ] exclude = [ "*.png", "**/data/json-parsing/*.json" ]
for path in pathlib.Path("src").glob("**/*"): for path in pathlib.Path("src").glob("**/*"):
if path.is_dir() or path.suffix == "" or any(path.match(x) for x in exclude): # Ideally we'd use generated as a glob, but .match("generated/**/*.json") doesn't work!
if path.is_dir() or path.suffix == "" or any(path.match(x) for x in exclude) or path.parts[1] == "generated":
continue continue
with path.open(encoding="utf-8") as file: with path.open(encoding="utf-8") as file: