MCPcopy Index your code
hub / github.com/pyinvoke/invoke / __setattr__

Method __setattr__

invoke/config.py:131–140  ·  view source on GitHub ↗
(self, key: str, value: Any)

Source from the content-addressed store, hash-verified

129 raise AttributeError(err)
130
131 def __setattr__(self, key: str, value: Any) -> None:
132 # Turn attribute-sets into config updates anytime we don't have a real
133 # attribute with the given name/key.
134 has_real_attr = key in dir(self)
135 if not has_real_attr:
136 # Make sure to trigger our own __setitem__ instead of going direct
137 # to our internal dict/cache
138 self[key] = value
139 else:
140 super().__setattr__(key, value)
141
142 def __iter__(self) -> Iterator[Dict[str, Any]]:
143 # For some reason Python is ignoring our __hasattr__ when determining

Callers 1

_setMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected