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

Method with_name

mypy/types.py:2326–2328  ·  view source on GitHub ↗

Return a copy of this type with the specified name.

(self, name: str)

Source from the content-addressed store, hash-verified

2324 return visitor.visit_callable_type(self)
2325
2326 def with_name(self, name: str) -> CallableType:
2327 """Return a copy of this type with the specified name."""
2328 return self.copy_modified(ret_type=self.ret_type, name=name)
2329
2330 def get_name(self) -> str | None:
2331 return self.name

Callers

nothing calls this directly

Calls 1

copy_modifiedMethod · 0.95

Tested by

no test coverage detected