Skip to content

Commit

Permalink
Ignore typeshed test files (#17249)
Browse files Browse the repository at this point in the history
During the last typehed update, we included the `@tests` folder which is
unnecessary for mypy.
Update the `sync-typeshed.py` script to exclude it in the future.

Refs:
- #17246
- python/typeshed#11762

---------

Co-authored-by: Shantanu <[email protected]>
Co-authored-by: AlexWaygood <[email protected]>
  • Loading branch information
3 people committed May 15, 2024
1 parent 0a2225b commit cdc956b
Show file tree
Hide file tree
Showing 42 changed files with 3 additions and 2,172 deletions.
4 changes: 3 additions & 1 deletion misc/sync-typeshed.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,9 @@ def update_typeshed(typeshed_dir: str, commit: str | None) -> str:
# Remove existing stubs.
shutil.rmtree(stdlib_dir)
# Copy new stdlib stubs.
shutil.copytree(os.path.join(typeshed_dir, "stdlib"), stdlib_dir)
shutil.copytree(
os.path.join(typeshed_dir, "stdlib"), stdlib_dir, ignore=shutil.ignore_patterns("@tests")
)
shutil.copy(os.path.join(typeshed_dir, "LICENSE"), os.path.join("mypy", "typeshed"))
return commit

Expand Down
25 changes: 0 additions & 25 deletions mypy/typeshed/stdlib/@tests/test_cases/asyncio/check_coroutines.py

This file was deleted.

38 changes: 0 additions & 38 deletions mypy/typeshed/stdlib/@tests/test_cases/asyncio/check_gather.py

This file was deleted.

28 changes: 0 additions & 28 deletions mypy/typeshed/stdlib/@tests/test_cases/asyncio/check_task.py

This file was deleted.

67 changes: 0 additions & 67 deletions mypy/typeshed/stdlib/@tests/test_cases/builtins/check_dict-py39.py

This file was deleted.

58 changes: 0 additions & 58 deletions mypy/typeshed/stdlib/@tests/test_cases/builtins/check_dict.py

This file was deleted.

Loading

0 comments on commit cdc956b

Please sign in to comment.