MCPcopy
hub / github.com/python-attrs/attrs / __call__

Method __call__

src/attr/validators.py:204–208  ·  view source on GitHub ↗
(self, inst, attr, value)

Source from the content-addressed store, hash-verified

202 validator = attrib()
203
204 def __call__(self, inst, attr, value):
205 if value is None:
206 return
207
208 self.validator(inst, attr, value)
209
210 def __repr__(self):
211 return f"<optional validator for {self.validator!r} or None>"

Callers

nothing calls this directly

Calls 1

validatorMethod · 0.45

Tested by

no test coverage detected