Skip to content

Don't use ModuleType.__getattr__ if we know module symbols #11597

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

Merged
merged 1 commit into from
Nov 23, 2021

Conversation

JukkaL
Copy link
Collaborator

@JukkaL JukkaL commented Nov 23, 2021

python/typeshed#6302 added __getattr__, but we don't want to always
use it, as it can result in undefined references to module attributes
being undetected.

This is an alternative to python/typeshed#6357.

Tested manually with a recent typeshed.

python/typeshd#6302 added `__getattr__`, but we don't want to always
use it, as it can result in undefined references to module attributes
being undetected.

This is an alternative to python/typeshed#6357.

Tested manually with a recent typeshed.
@JukkaL JukkaL merged commit 8610329 into master Nov 23, 2021
@JukkaL JukkaL deleted the module-getattr branch November 23, 2021 10:56
tushar-deepsource pushed a commit to DeepSourceCorp/mypy that referenced this pull request Jan 20, 2022
)

python/typeshd#6302 added `__getattr__`, but we don't want to always
use it, as it can result in undefined references to module attributes
being undetected.

This is an alternative to python/typeshed#6357.

Tested manually with a recent typeshed.
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