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

Method get_name

mypy/stubtest.py:919–924  ·  view source on GitHub ↗
(arg: Any)

Source from the content-addressed store, hash-verified

917
918 def __str__(self) -> str:
919 def get_name(arg: Any) -> str:
920 if isinstance(arg, inspect.Parameter):
921 return arg.name
922 if isinstance(arg, nodes.Argument):
923 return arg.variable.name
924 raise AssertionError
925
926 def get_type(arg: Any) -> str | None:
927 if isinstance(arg, inspect.Parameter):

Callers

nothing calls this directly

Calls 1

isinstanceFunction · 0.85

Tested by

no test coverage detected