From 6c832047379d418f546a5e0eb76938ede9479e67 Mon Sep 17 00:00:00 2001 From: Jukka Lehtosalo Date: Tue, 18 Jun 2019 17:08:18 +0100 Subject: [PATCH] New semantic analyzer: remove unused code Follow-up to #7017. --- mypy/newsemanal/semanal.py | 5 ----- 1 file changed, 5 deletions(-) diff --git a/mypy/newsemanal/semanal.py b/mypy/newsemanal/semanal.py index a8986c5444c8c..587386f27c368 100644 --- a/mypy/newsemanal/semanal.py +++ b/mypy/newsemanal/semanal.py @@ -1676,11 +1676,6 @@ def visit_import_from(self, imp: ImportFrom) -> None: if self.process_import_over_existing_name( imported_id, existing_symbol, node, imp): continue - if (existing_symbol and isinstance(existing_symbol.node, MypyFile) and - existing_symbol.no_serialize): # submodule added to parent module - # Special case: allow replacing submodules with variables. This pattern - # is used by some libraries. - del self.globals[imported_id] if existing_symbol and isinstance(node.node, PlaceholderNode): # Imports are special, some redefinitions are allowed, so wait until # we know what is the new symbol node.