diff --git a/geojson_pydantic/geometries.py b/geojson_pydantic/geometries.py index b1f556a..38c7ccf 100644 --- a/geojson_pydantic/geometries.py +++ b/geojson_pydantic/geometries.py @@ -109,7 +109,7 @@ def wkt(self) -> str: class Point(_GeometryBase): """Point Model""" - type: Literal["Point"] + type: Literal["Point"] = "Point" coordinates: Position def __wkt_coordinates__(self, coordinates: Any, force_z: bool) -> str: @@ -125,7 +125,7 @@ def has_z(self) -> bool: class MultiPoint(_GeometryBase): """MultiPoint Model""" - type: Literal["MultiPoint"] + type: Literal["MultiPoint"] = "MultiPoint" coordinates: MultiPointCoords def __wkt_coordinates__(self, coordinates: Any, force_z: bool) -> str: @@ -144,7 +144,7 @@ def has_z(self) -> bool: class LineString(_GeometryBase): """LineString Model""" - type: Literal["LineString"] + type: Literal["LineString"] = "LineString" coordinates: LineStringCoords def __wkt_coordinates__(self, coordinates: Any, force_z: bool) -> str: @@ -160,7 +160,7 @@ def has_z(self) -> bool: class MultiLineString(_GeometryBase): """MultiLineString Model""" - type: Literal["MultiLineString"] + type: Literal["MultiLineString"] = "MultiLineString" coordinates: MultiLineStringCoords def __wkt_coordinates__(self, coordinates: Any, force_z: bool) -> str: @@ -176,7 +176,7 @@ def has_z(self) -> bool: class Polygon(_GeometryBase): """Polygon Model""" - type: Literal["Polygon"] + type: Literal["Polygon"] = "Polygon" coordinates: PolygonCoords def __wkt_coordinates__(self, coordinates: Any, force_z: bool) -> str: @@ -224,7 +224,7 @@ def from_bounds( class MultiPolygon(_GeometryBase): """MultiPolygon Model""" - type: Literal["MultiPolygon"] + type: Literal["MultiPolygon"] = "MultiPolygon" coordinates: MultiPolygonCoords def __wkt_coordinates__(self, coordinates: Any, force_z: bool) -> str: @@ -248,7 +248,7 @@ def check_closure(cls, coordinates: List) -> List: class GeometryCollection(_GeoJsonBase): """GeometryCollection Model""" - type: Literal["GeometryCollection"] + type: Literal["GeometryCollection"] = "GeometryCollection" geometries: List[Geometry] def __iter__(self) -> Iterator[Geometry]: # type: ignore [override] @@ -273,7 +273,7 @@ def wkt(self) -> str: # Get the wkt from each of the geometries in the collection geometries = ( - f'({", ".join(geom.wkt for geom in self.geometries)})' + f"({', '.join(geom.wkt for geom in self.geometries)})" if self.geometries else "EMPTY" )