Skip to content

Commit

Permalink
Merge pull request #234 from hotosm/actions/black
Browse files Browse the repository at this point in the history
Format Python code with psf/black push
  • Loading branch information
kshitijrajsharma authored Mar 20, 2024
2 parents 09fff0a + df67104 commit 75cffb1
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 33 deletions.
4 changes: 3 additions & 1 deletion src/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -1462,7 +1462,9 @@ def process_export_format(export_format):
and PARALLEL_PROCESSING_CATEGORIES is True
):
logging.info(
"Using Parallel Processing for %s Export formats with total %s workers", category_name.lower(), os.cpu_count()
"Using Parallel Processing for %s Export formats with total %s workers",
category_name.lower(),
os.cpu_count(),
)
with concurrent.futures.ThreadPoolExecutor(
max_workers=os.cpu_count()
Expand Down
64 changes: 32 additions & 32 deletions src/validation/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -300,22 +300,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)
Expand Down Expand Up @@ -612,22 +612,22 @@ class DynamicCategoriesModel(BaseModel, GeometryValidatorMixin):
}
],
)
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)
Expand Down

0 comments on commit 75cffb1

Please sign in to comment.