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 crash in astdiff.py related to ec11a500f. #5126

Merged
merged 1 commit into from Jun 1, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 2 additions & 1 deletion mypy/server/aststrip.py
Expand Up @@ -213,7 +213,8 @@ def visit_import(self, node: Import) -> None:
for name, as_name in node.ids:
imported_name = as_name or name
initial = imported_name.split('.')[0]
self.names[initial] = SymbolTableNode(UNBOUND_IMPORTED, None)
if initial in self.names:
self.names[initial] = SymbolTableNode(UNBOUND_IMPORTED, None)

def visit_import_all(self, node: ImportAll) -> None:
# Imports can include both overriding symbols and fresh ones,
Expand Down