Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Further improve mypy_test.py #7484

Merged
merged 2 commits into from
Mar 13, 2022
Merged

Further improve mypy_test.py #7484

merged 2 commits into from
Mar 13, 2022

Conversation

AlexWaygood
Copy link
Member

@AlexWaygood AlexWaygood commented Mar 13, 2022

  • Run mypy on the 3.11 stdlib in CI, as a regression test for Basic support for Python 3.11's typeshed mypy#12220
  • Correct the docstring at the top of the file following the changes made in Fix mypy test #7478
  • Stop the test from crashing when run locally if there's an extra file/folder in the stubs directory. (I had a few .mypy_cache folders and extra codemodding scripts in various places, which meant that the test was crashing. The dist_path / "METADATA.toml" call in the is_supported function was evaluating to a nonexistent filepath.)

if not is_supported(distribution, major):
distribution_path = Path("stubs", distribution)

if not is_probably_stubs_folder(distribution_path):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How will we catch it if somebody forgets to put a METADATA.toml in a new stubs folder?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any better after 83b05f3?

@AlexWaygood AlexWaygood merged commit 2f338ce into python:master Mar 13, 2022
@AlexWaygood AlexWaygood deleted the 311 branch March 13, 2022 19:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants