MCPcopy
hub / github.com/python/mypy / stringify_type

Method stringify_type

mypy/strconv.py:41–44  ·  view source on GitHub ↗
(self, t: mypy.types.Type)

Source from the content-addressed store, hash-verified

39 self.id_mapper = IdMapper()
40
41 def stringify_type(self, t: mypy.types.Type) -> str:
42 import mypy.types
43
44 return t.accept(mypy.types.TypeStrVisitor(id_mapper=self.id_mapper, options=self.options))
45
46 def get_id(self, o: object) -> int | None:
47 if self.id_mapper:

Callers 7

visit_class_defMethod · 0.95
visit_type_var_exprMethod · 0.95
visit_paramspec_exprMethod · 0.95
visit_type_alias_exprMethod · 0.95
visit_namedtuple_exprMethod · 0.95
visit__promote_exprMethod · 0.95

Calls 1

acceptMethod · 0.45

Tested by

no test coverage detected