mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-06 12:14:27 +08:00
Move stdlib allowlists to stdlib/@tests (#11982)
Rename py3_common.txt to common.txt
This commit is contained in:
2
.gitattributes
vendored
2
.gitattributes
vendored
@@ -3,7 +3,7 @@
|
||||
* eol=lf
|
||||
# Set linguist-language to support comments syntax highlight
|
||||
**/stubtest_allowlist*.txt linguist-language=ini
|
||||
tests/stubtest_allowlists/*.txt linguist-language=ini
|
||||
**/stubtest_allowlists/*.txt linguist-language=ini
|
||||
tests/pytype_exclude_list.txt linguist-language=ini
|
||||
pyrightconfig*.json linguist-language=jsonc
|
||||
.vscode/*.json linguist-language=jsonc
|
||||
|
||||
2
.gitignore
vendored
2
.gitignore
vendored
@@ -73,4 +73,4 @@ analyze.py
|
||||
.python-version
|
||||
|
||||
# deliberately local test configuration files
|
||||
tests/stubtest_allowlists/*.local
|
||||
stdlib/@tests/stubtest_allowlists/*.local
|
||||
|
||||
@@ -137,7 +137,7 @@ on your typeshed fork).
|
||||
As a convenience, stubtest\_stdlib.py will look for local-only allowlist files
|
||||
and use those if they are present. Only version-specific local allowlists are supported.
|
||||
An example local allowlist file is
|
||||
`tests/stubtest_allowlists/py312.txt.local`. Use caution when taking advantage of this feature;
|
||||
`stdlib/@tests/stubtest_allowlists/py312.txt.local`. Use caution when taking advantage of this feature;
|
||||
the CI run of stubtest remains canonical.
|
||||
|
||||
If you need a specific version of Python to repro a CI failure,
|
||||
@@ -145,7 +145,7 @@ If you need a specific version of Python to repro a CI failure,
|
||||
|
||||
Due to its dynamic nature, you may run into false positives. In this case, you
|
||||
can add to the allowlists for each affected Python version in
|
||||
`tests/stubtest_allowlists`. Please file issues for stubtest false positives
|
||||
`stdlib/@tests/stubtest_allowlists`. Please file issues for stubtest false positives
|
||||
at [mypy](https://github.com/python/mypy/issues).
|
||||
|
||||
## stubtest\_third\_party.py
|
||||
|
||||
@@ -163,14 +163,14 @@ def get_all_testcase_directories() -> list[DistributionTests]:
|
||||
|
||||
def allowlists_path(distribution_name: str) -> Path:
|
||||
if distribution_name == "stdlib":
|
||||
return Path("tests", "stubtest_allowlists")
|
||||
return tests_path("stdlib") / "stubtest_allowlists"
|
||||
else:
|
||||
return tests_path(distribution_name)
|
||||
|
||||
|
||||
def common_allowlists(distribution_name: str) -> list[str]:
|
||||
if distribution_name == "stdlib":
|
||||
return ["py3_common.txt", f"{sys.platform}.txt"]
|
||||
return ["common.txt", f"{sys.platform}.txt"]
|
||||
else:
|
||||
return ["stubtest_allowlist.txt", f"stubtest_allowlist_{sys.platform}.txt"]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user