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

Method print_annotation

mypy/stubutil.py:837–844  ·  view source on GitHub ↗
(
        self,
        t: Type,
        known_modules: list[str] | None = None,
        local_modules: list[str] | None = None,
    )

Source from the content-addressed store, hash-verified

835 return "[" + ", ".join(type_args_list) + "]"
836
837 def print_annotation(
838 self,
839 t: Type,
840 known_modules: list[str] | None = None,
841 local_modules: list[str] | None = None,
842 ) -> str:
843 printer = AnnotationPrinter(self, known_modules, local_modules)
844 return t.accept(printer)
845
846 def is_not_in_all(self, name: str) -> bool:
847 if self.is_private_name(name):

Callers 4

_get_func_argsMethod · 0.80
_get_func_returnMethod · 0.80
get_initMethod · 0.80
strip_or_importMethod · 0.80

Calls 2

AnnotationPrinterClass · 0.85
acceptMethod · 0.45

Tested by

no test coverage detected