MCPcopy
hub / github.com/pallets/werkzeug / __set__

Method __set__

src/werkzeug/_internal.py:177–184  ·  view source on GitHub ↗
(self, instance: t.Any, value: _TAccessorValue)

Source from the content-addressed store, hash-verified

175 return value # type: ignore
176
177 def __set__(self, instance: t.Any, value: _TAccessorValue) -> None:
178 if self.read_only:
179 raise AttributeError("read only property")
180
181 if self.dump_func is not None:
182 self.lookup(instance)[self.name] = self.dump_func(value)
183 else:
184 self.lookup(instance)[self.name] = value
185
186 def __delete__(self, instance: t.Any) -> None:
187 if self.read_only:

Callers

nothing calls this directly

Calls 1

lookupMethod · 0.95

Tested by

no test coverage detected