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

Fix external exclude behavior #582

Merged
merged 1 commit into from
Jan 29, 2025
Merged

Conversation

emdoyle
Copy link
Member

@emdoyle emdoyle commented Jan 29, 2025

Fixes: #580

This issue is a regression due to a recent refactor of the check-external behavior. We check for excludes earlier (rather than after all diagnostics are produced) and this check did not handle the default case correctly. Instead of defaulting to the top level module name for the import, we first normalized this name as if it were a distribution name (e.g. _typeshed -> typeshed, __future__ -> future).

This PR fixes the check so that the default case is the literal top level module name.

@emdoyle emdoyle merged commit 6ff5a44 into main Jan 29, 2025
8 of 11 checks passed
@emdoyle emdoyle deleted the fix-typeshed-external-exclude branch January 29, 2025 21:13
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.

adding _typeshed to external.excludes no longer works
1 participant