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

stubtest: increase coverage #11634

Merged
merged 5 commits into from
Dec 1, 2021
Merged

Conversation

hauntsaninja
Copy link
Collaborator

@hauntsaninja hauntsaninja commented Nov 29, 2021

With missing stubs and no runtime __all__, we now correctly find module level constants of primitive types (like int or str). While this can have some false positives, e.g. with from module import int_constant, I think this is an important fix to make since it allows for saner user expectations (see the change to test_missing_no_runtime_all).

The change from checking module_public to not module_hidden allows better checking in cases where the stub may wish to type runtime details. This corresponds to checking _f and g in test_non_public_1 and test_non_public_2. The new errors in typeshed seem largely worthwhile.

@hauntsaninja
Copy link
Collaborator Author

(fixing lint on master in #11635)

@hauntsaninja hauntsaninja merged commit 7a2aff8 into python:master Dec 1, 2021
@hauntsaninja hauntsaninja deleted the stubtmis branch December 1, 2021 22:37
tushar-deepsource pushed a commit to DeepSourceCorp/mypy that referenced this pull request Jan 20, 2022
Co-authored-by: hauntsaninja <>
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