mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-07 12:44:28 +08:00
Rename check_consistent.py to check_typeshed_structure.py (#11761)
This commit is contained in:
6
.github/workflows/tests.yml
vendored
6
.github/workflows/tests.yml
vendored
@@ -22,8 +22,8 @@ concurrency:
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
file-consistency:
|
||||
name: Check file consistency
|
||||
typeshed-structure:
|
||||
name: Check typeshed structure
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
@@ -32,7 +32,7 @@ jobs:
|
||||
python-version: "3.12"
|
||||
- run: curl -LsSf https://astral.sh/uv/install.sh | sh
|
||||
- run: uv pip install -r requirements-tests.txt --system
|
||||
- run: python ./tests/check_consistent.py
|
||||
- run: python ./tests/check_typeshed_structure.py
|
||||
|
||||
new-syntax:
|
||||
name: Ensure new syntax usage
|
||||
|
||||
@@ -221,7 +221,7 @@ This has the following keys:
|
||||
distribution.
|
||||
|
||||
The format of all `METADATA.toml` files can be checked by running
|
||||
`python3 ./tests/check_consistent.py`.
|
||||
`python3 ./tests/check_typeshed_structure.py`.
|
||||
|
||||
|
||||
## Preparing Changes
|
||||
|
||||
@@ -84,8 +84,8 @@ def main() -> None:
|
||||
print("\nRunning pre-commit...")
|
||||
pre_commit_result = subprocess.run(["pre-commit", "run", "--all-files"])
|
||||
|
||||
print("\nRunning check_consistent.py...")
|
||||
check_consistent_result = subprocess.run([sys.executable, "tests/check_consistent.py"])
|
||||
print("\nRunning check_typeshed_structure.py...")
|
||||
check_structure_result = subprocess.run([sys.executable, "tests/check_typeshed_structure.py"])
|
||||
print("\nRunning check_new_syntax.py...")
|
||||
check_new_syntax_result = subprocess.run([sys.executable, "tests/check_new_syntax.py"])
|
||||
|
||||
@@ -179,7 +179,7 @@ def main() -> None:
|
||||
any_failure = any(
|
||||
[
|
||||
pre_commit_result.returncode,
|
||||
check_consistent_result.returncode,
|
||||
check_structure_result.returncode,
|
||||
check_new_syntax_result.returncode,
|
||||
pyright_returncode,
|
||||
mypy_result.returncode,
|
||||
@@ -206,7 +206,7 @@ def main() -> None:
|
||||
applied some autofixes. If the latter, you may want to check
|
||||
that the autofixes did sensible things."""
|
||||
)
|
||||
print("Check consistent:", _SUCCESS if check_consistent_result.returncode == 0 else _FAILED)
|
||||
print("Check structure:", _SUCCESS if check_structure_result.returncode == 0 else _FAILED)
|
||||
print("Check new syntax:", _SUCCESS if check_new_syntax_result.returncode == 0 else _FAILED)
|
||||
if pyright_skipped:
|
||||
print("Pyright:", _SKIPPED)
|
||||
|
||||
@@ -7,7 +7,7 @@ tests the stubs with [mypy](https://github.com/python/mypy/)
|
||||
[pyright](https://github.com/microsoft/pyright).
|
||||
- `tests/regr_test.py` runs mypy against the test cases for typeshed's
|
||||
stubs, guarding against accidental regressions.
|
||||
- `tests/check_consistent.py` checks that typeshed's directory
|
||||
- `tests/check_typeshed_structure.py` checks that typeshed's directory
|
||||
structure and metadata files are correct.
|
||||
- `tests/check_new_syntax.py` contains linter-like checks to ensure
|
||||
that certain code conventions are followed.
|
||||
@@ -109,11 +109,13 @@ for more information about what
|
||||
these test cases are for and how they work. Run `python tests/regr_test.py --help`
|
||||
for information on the various configuration options.
|
||||
|
||||
## check\_consistent.py
|
||||
## check\_typeshed\_structure.py
|
||||
|
||||
This checks that typeshed's directory structure and metadata files are correct.
|
||||
|
||||
Run using:
|
||||
```bash
|
||||
$ python3 tests/check_consistent.py
|
||||
$ python3 tests/check_typeshed_structure.py
|
||||
```
|
||||
|
||||
## stubtest\_stdlib.py
|
||||
|
||||
Reference in New Issue
Block a user