File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -6296,8 +6296,16 @@ def lookup(
62966296 return node
62976297
62986298 def record_imported_symbol (self , node : SymbolNode ) -> None :
6299- fullname = node .fullname
6300- if not isinstance (node , MypyFile ):
6299+ if isinstance (node , MypyFile ):
6300+ fullname = node .fullname
6301+ elif isinstance (node , TypeInfo ):
6302+ fullname = node .module_name
6303+ elif isinstance (node , TypeAlias ):
6304+ fullname = node .module
6305+ elif isinstance (node , (Var , FuncDef , OverloadedFuncDef )) and node .info :
6306+ fullname = node .info .module_name
6307+ else :
6308+ fullname = node .fullname .rsplit ("." )[0 ]
63016309 while fullname not in self .modules and "." in fullname :
63026310 fullname = fullname .rsplit ("." )[0 ]
63036311 if fullname != self .cur_mod_id and fullname not in self .cur_mod_node .module_refs :
You can’t perform that action at this time.
0 commit comments