- Sort Score
- Result 10 results
- Languages All
Results 1 - 2 of 2 for __root__ (0.05 sec)
-
tests/test_jsonable_encoder.py
assert jsonable_encoder(obj) == {"path": "\\foo\\bar"} @needs_pydanticv1 def test_encode_root(): class ModelWithRoot(BaseModel): __root__: str model = ModelWithRoot(__root__="Foo") assert jsonable_encoder(model) == "Foo" @needs_pydanticv2 def test_decimal_encoder_float(): data = {"value": Decimal(1.23)}
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Apr 18 21:56:59 UTC 2024 - 9K bytes - Viewed (0) -
fastapi/datastructures.py
if the overridden default value was truthy. """ def __init__(self, value: Any): self.value = value def __bool__(self) -> bool: return bool(self.value) def __eq__(self, o: object) -> bool: return isinstance(o, DefaultPlaceholder) and o.value == self.value DefaultType = TypeVar("DefaultType")
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Tue Apr 02 02:48:51 UTC 2024 - 5.6K bytes - Viewed (0)