Skip to content

semanal: fix module_public in the presence of getattr #11411

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 2 commits into from
Nov 8, 2021

Conversation

hauntsaninja
Copy link
Collaborator

This came up in python/typeshed#6171

@@ -1795,6 +1795,12 @@ def visit_import_from(self, imp: ImportFrom) -> None:
missing_submodule = False
imported_id = as_id or id

# Modules imported in a stub file without using 'from Y import X as X' will
Copy link
Member

Choose a reason for hiding this comment

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

Is it possible to create a test with similar problem as in python/typeshed#6171 ? 🤔

Copy link
Collaborator

Choose a reason for hiding this comment

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

Agreed. This PR looks good, but a test case would be a nice bonus.

@hauntsaninja
Copy link
Collaborator Author

Added a test!

@hauntsaninja hauntsaninja merged commit 4e2f4ff into python:master Nov 8, 2021
@hauntsaninja hauntsaninja deleted the modpub branch November 8, 2021 05:02
tushar-deepsource pushed a commit to DeepSourceCorp/mypy that referenced this pull request Jan 20, 2022
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.

3 participants