add pre-commit config (#6341)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Akuli <akuviljanen17@gmail.com>
This commit is contained in:
Jelle Zijlstra
2021-11-19 06:46:51 -08:00
committed by GitHub
parent 1fcb613338
commit 1f1bc6f27c
9 changed files with 52 additions and 68 deletions

View File

@@ -39,15 +39,9 @@ def run_stubtest(typeshed_dir: Path) -> int:
if ignore_unused_allowlist:
cmd += ["--ignore-unused-allowlist"]
if (allowlist_dir / platform_allowlist).exists():
cmd += [
"--allowlist",
str(allowlist_dir / platform_allowlist),
]
cmd += ["--allowlist", str(allowlist_dir / platform_allowlist)]
if (allowlist_dir / combined_allowlist).exists():
cmd += [
"--allowlist",
str(allowlist_dir / combined_allowlist),
]
cmd += ["--allowlist", str(allowlist_dir / combined_allowlist)]
if sys.version_info < (3, 10):
# As discussed in https://github.com/python/typeshed/issues/3693, we only aim for
# positional-only arg accuracy for the latest Python version.