From e528d0bb374ab61b2cb1c7f71bc621663bc84cc3 Mon Sep 17 00:00:00 2001 From: Markus Anthony Doerheim Ho-Yen <96105947+markus-work@users.noreply.github.com> Date: Thu, 4 Jan 2024 10:39:31 +0100 Subject: [PATCH] Remove type hinting from clean_model as workaround Ref: https://github.com/tiangolo/fastapi/discussions/10661 --- geojson_pydantic/base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/geojson_pydantic/base.py b/geojson_pydantic/base.py index 61e79fb..299cfb8 100644 --- a/geojson_pydantic/base.py +++ b/geojson_pydantic/base.py @@ -53,7 +53,7 @@ def validate_bbox(cls, bbox: Optional[BBox]) -> Optional[BBox]: return bbox @model_serializer(when_used="always", mode="wrap") - def clean_model(self, serializer: Any, info: SerializationInfo) -> Dict[str, Any]: + def clean_model(self, serializer: Any, info: SerializationInfo): """Custom Model serializer to match the GeoJSON specification. Used to remove fields which are optional but cannot be null values.