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

Method with_name

mypy/types.py:2701–2705  ·  view source on GitHub ↗
(self, name: str)

Source from the content-addressed store, hash-verified

2699 return self._items[0].type_object()
2700
2701 def with_name(self, name: str) -> Overloaded:
2702 ni: list[CallableType] = []
2703 for it in self._items:
2704 ni.append(it.with_name(name))
2705 return Overloaded(ni)
2706
2707 def get_name(self) -> str | None:
2708 return self._items[0].name

Callers 3

set_callable_nameFunction · 0.45
class_callableFunction · 0.45
run_caseMethod · 0.45

Calls 2

OverloadedClass · 0.85
appendMethod · 0.80

Tested by 1

run_caseMethod · 0.36