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

Method __setattr__

mypy/split_namespace.py:25–29  ·  view source on GitHub ↗
(self, name: str, value: Any)

Source from the content-addressed store, hash-verified

23 return (self._standard_namespace, self._alt_namespace)
24
25 def __setattr__(self, name: str, value: Any) -> None:
26 if name.startswith(self._alt_prefix):
27 setattr(self._alt_namespace, name[len(self._alt_prefix) :], value)
28 else:
29 setattr(self._standard_namespace, name, value)
30
31 def __getattr__(self, name: str) -> Any:
32 if name.startswith(self._alt_prefix):

Callers

nothing calls this directly

Calls 3

setattrFunction · 0.85
lenFunction · 0.85
startswithMethod · 0.45

Tested by

no test coverage detected