MCPcopy
hub / github.com/pydantic/pydantic / fail

Method fail

tests/test_private_attributes.py:527–530  ·  view source on GitHub ↗
(obj)

Source from the content-addressed store, hash-verified

525 delete_calls.append(obj)
526
527 def fail(obj):
528 # I have purposely not used the exact formatting you'd get if the attribute wasn't defined,
529 # to make it clear this function is being called, while also having sensible behavior
530 raise AttributeError(f'{self.name!r} is not defined on {obj!r}')
531
532 self.fn = fail
533

Calls

no outgoing calls

Tested by

no test coverage detected