MCPcopy
hub / github.com/nonebot/nonebot2 / _validate_2

Method _validate_2

tests/test_compat.py:161–163  ·  view source on GitHub ↗
(cls, v: Any)

Source from the content-addressed store, hash-verified

159
160 @classmethod
161 def _validate_2(cls, v: Any) -> Any:
162 called.append(2)
163 return cls(test=v["test"])
164
165 assert type_validate_python(TestModel, {"test": 1}) == TestModel(test=1)
166 assert called == [1, 2]

Callers

nothing calls this directly

Calls 1

appendMethod · 0.80

Tested by

no test coverage detected