File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -6297,6 +6297,8 @@ def lookup(
62976297
62986298 def record_imported_symbol (self , node : SymbolNode ) -> None :
62996299 """If the symbol was not defined in current module, add its module to module_refs."""
6300+ if not node .fullname :
6301+ return
63006302 if isinstance (node , MypyFile ):
63016303 fullname = node .fullname
63026304 elif isinstance (node , TypeInfo ):
@@ -6307,7 +6309,9 @@ def record_imported_symbol(self, node: SymbolNode) -> None:
63076309 fullname = node .info .module_name
63086310 else :
63096311 fullname = node .fullname .rsplit ("." )[0 ]
6310- while fullname not in self .modules and "." in fullname :
6312+ if fullname == self .cur_mod_id :
6313+ return
6314+ while "." in fullname and fullname not in self .modules :
63116315 fullname = fullname .rsplit ("." )[0 ]
63126316 if fullname != self .cur_mod_id and fullname not in self .cur_mod_node .module_refs :
63136317 self .cur_mod_node .module_refs .update (split_module_names (fullname ))
You can’t perform that action at this time.
0 commit comments