MCPcopy
hub / github.com/pydantic/pydantic / quadruple_x_plus_one

Method quadruple_x_plus_one

tests/test_serialize.py:1108–1109  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1106 @computed_field
1107 @property
1108 def quadruple_x_plus_one(self) -> Annotated[int, PlainSerializer(lambda v: v + 1, return_type=int)]:
1109 return self.two_x * 2
1110
1111 m = Model(x=1)
1112 assert m.x == 1

Callers

nothing calls this directly

Calls 1

PlainSerializerClass · 0.90

Tested by

no test coverage detected