MCPcopy Index your code
hub / github.com/python/mypy / visit_instance

Method visit_instance

mypy/server/deps.py:969–979  ·  view source on GitHub ↗
(self, typ: Instance)

Source from the content-addressed store, hash-verified

967 return get_type_triggers(typ, self.use_logical_deps, self.seen_aliases)
968
969 def visit_instance(self, typ: Instance) -> list[str]:
970 trigger = make_trigger(typ.type.fullname)
971 triggers = [trigger]
972 for arg in typ.args:
973 triggers.extend(self.get_type_triggers(arg))
974 if typ.last_known_value:
975 triggers.extend(self.get_type_triggers(typ.last_known_value))
976 if typ.extra_attrs and typ.extra_attrs.mod_name:
977 # Module as type effectively depends on all module attributes, use wildcard.
978 triggers.append(make_wildcard_trigger(typ.extra_attrs.mod_name))
979 return triggers
980
981 def visit_type_alias_type(self, typ: TypeAliasType) -> list[str]:
982 if typ in self.seen_aliases:

Callers

nothing calls this directly

Calls 5

get_type_triggersMethod · 0.95
make_triggerFunction · 0.90
make_wildcard_triggerFunction · 0.90
extendMethod · 0.80
appendMethod · 0.80

Tested by

no test coverage detected