def visit_name(self, node: astroid.Name) -> None: try: node.inf_type = TypeInfo(self.lookup_type(node, node.name)) except KeyError: if node.name in self.type_store.classes: node.inf_type = TypeInfo(Type[__builtins__[node.name]]) elif node.name in self.type_store.functions: node.inf_type = TypeInfo( self.type_store.functions[node.name][0]) else: # This is an unbound identifier. Ignore it. node.inf_type = TypeInfo(Any)
def visit_name(self, node: astroid.Name) -> None: node.inf_type = self.lookup_inf_type(node, node.name)