8000 Bump `PYTHON3_VERSION_MIN` to `3.7` by sobolevn · Pull Request #15668 · python/mypy · GitHub
[go: up one dir, main page]

Skip to content

Bump PYTHON3_VERSION_MIN to 3.7 #15668

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 7 commits into from
Jul 15, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix is_stub logic
  • Loading branch information
sobolevn committed Jul 14, 2023
commit 117901c06b74bfa72322c0f3e9a7ce9126509c5f
4 changes: 2 additions & 2 deletions mypy/semanal.py
Original file line number Diff line number Diff line change
Expand Up @@ -2521,7 +2521,7 @@ def visit_import_from(self, imp: ImportFrom) -> None:
elif fullname in self.missing_modules:
missing_submodule = True
# If it is still not resolved, check for a module level __getattr__
if module and not node and module.is_stub and "__getattr__" in module.names:
if module and not node and "__getattr__" in module.names:
# We store the fullname of the original definition so that we can
# detect whether two imported names refer to the same thing.
fullname = module_id + "." + id
Expand Down Expand Up @@ -5713,7 +5713,7 @@ def get_module_symbol(self, node: MypyFile, name: str) -> SymbolTableNode | None
sym = SymbolTableNode(GDEF, self.modules[fullname])
elif self.is_incomplete_namespace(module):
self.record_incomplete_ref()
elif "__getattr__" in names and node.is_stub:
elif "__getattr__" in names:
gvar = self.create_getattr_var(names["__getattr__"], name, fullname)
if gvar:
sym = SymbolTableNode(GDEF, gvar)
Expand Down
0