From 0b634cc0161be77d4f192e628e0f5bd25cec1a0c Mon Sep 17 00:00:00 2001 From: Emilio Mariscal Date: Mon, 18 Nov 2024 14:24:41 -0300 Subject: [PATCH] Black code --- src/post_processing/geojson_stats.py | 1 - src/validation/models.py | 64 ++++++++++++++-------------- 2 files changed, 32 insertions(+), 33 deletions(-) diff --git a/src/post_processing/geojson_stats.py b/src/post_processing/geojson_stats.py index 8f9d3072..9ca74d68 100644 --- a/src/post_processing/geojson_stats.py +++ b/src/post_processing/geojson_stats.py @@ -15,7 +15,6 @@ def __init__(self, filters, *args, **kwargs): self.config.properties_prop = "properties.tags" if filters and filters.tags: - for tag in CONFIG_AREA: if self.check_filter(filters.tags, tag): self.config.keys.append(tag) diff --git a/src/validation/models.py b/src/validation/models.py index f97f9100..14cf5b6f 100644 --- a/src/validation/models.py +++ b/src/validation/models.py @@ -311,22 +311,22 @@ class StatsRequestParams(BaseModel, GeometryValidatorMixin): max_length=3, example="NPL", ) - geometry: Optional[Union[Polygon, MultiPolygon, Feature, FeatureCollection]] = ( - Field( - default=None, - example={ - "type": "Polygon", - "coordinates": [ - [ - [83.96919250488281, 28.194446860487773], - [83.99751663208006, 28.194446860487773], - [83.99751663208006, 28.214869548073377], - [83.96919250488281, 28.214869548073377], - [83.96919250488281, 28.194446860487773], - ] - ], - }, - ) + geometry: Optional[ + Union[Polygon, MultiPolygon, Feature, FeatureCollection] + ] = Field( + default=None, + example={ + "type": "Polygon", + "coordinates": [ + [ + [83.96919250488281, 28.194446860487773], + [83.99751663208006, 28.194446860487773], + [83.99751663208006, 28.214869548073377], + [83.96919250488281, 28.214869548073377], + [83.96919250488281, 28.194446860487773], + ] + ], + }, ) @validator("geometry", pre=True, always=True) @@ -632,22 +632,22 @@ class DynamicCategoriesModel(CategoriesBase, GeometryValidatorMixin): max_length=3, example="USA", ) - geometry: Optional[Union[Polygon, MultiPolygon, Feature, FeatureCollection]] = ( - Field( - default=None, - example={ - "type": "Polygon", - "coordinates": [ - [ - [83.96919250488281, 28.194446860487773], - [83.99751663208006, 28.194446860487773], - [83.99751663208006, 28.214869548073377], - [83.96919250488281, 28.214869548073377], - [83.96919250488281, 28.194446860487773], - ] - ], - }, - ) + geometry: Optional[ + Union[Polygon, MultiPolygon, Feature, FeatureCollection] + ] = Field( + default=None, + example={ + "type": "Polygon", + "coordinates": [ + [ + [83.96919250488281, 28.194446860487773], + [83.99751663208006, 28.194446860487773], + [83.99751663208006, 28.214869548073377], + [83.96919250488281, 28.214869548073377], + [83.96919250488281, 28.194446860487773], + ] + ], + }, ) @validator("geometry", pre=True, always=True)