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

Extract VERSIONS parsing to _utils.py #12351

Merged
merged 1 commit into from
Jul 16, 2024

Conversation

srittau
Copy link
Collaborator

@srittau srittau commented Jul 16, 2024

Preliminary refactoring for fixing #12298.

Copy link
Member

@AlexWaygood AlexWaygood left a comment

Choose a reason for hiding this comment

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

Haven't checked line-by-line, but LGTM assuming that you're just moving and deduplicating code!

@srittau
Copy link
Collaborator Author

srittau commented Jul 16, 2024

Haven't checked line-by-line, but LGTM assuming that you're just moving and deduplicating code!

Well, parse_stdlib_versions_file() is basically parse_versions() from mypy_test with hard-coded filename, using pathlib to open and this extra assertion:

assert mod not in result, f"Duplicate module {mod} in VERSIONS"

In check_typecheck_structure, I removed the dupe check, in favor of the assertion above. (Which was already in check_typecheck_structure, so the dupe check was already without function.)

@srittau srittau merged commit f0afb04 into python:main Jul 16, 2024
67 checks passed
@srittau srittau deleted the extract-parse-versions branch July 16, 2024 10:51
max-muoto pushed a commit to max-muoto/typeshed that referenced this pull request Jul 23, 2024
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.

None yet

2 participants