MCPcopy
hub / github.com/pydantic/pydantic / check_foobar

Method check_foobar

tests/test_validators.py:1107–1108  ·  view source on GitHub ↗
(cls, v: Any)

Source from the content-addressed store, hash-verified

1105 @validator('foobar', each_item=True)
1106 @classmethod
1107 def check_foobar(cls, v: Any):
1108 return v + 1
1109
1110 assert Model(foobar={1: 1}).foobar == {1: 2}
1111

Callers

nothing calls this directly

Calls 1

itemsMethod · 0.45

Tested by

no test coverage detected