Skip to content

Commit b4e075d

Browse files
committed
lint edits
1 parent 20b576f commit b4e075d

File tree

2 files changed

+20
-16
lines changed

2 files changed

+20
-16
lines changed

stac_fastapi/opensearch/stac_fastapi/opensearch/database_logic.py

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
from opensearchpy import exceptions, helpers
1414
from opensearchpy.helpers.query import Q
1515
from opensearchpy.helpers.search import Search
16+
from starlette.requests import Request
17+
1618
from stac_fastapi.core.base_database_logic import BaseDatabaseLogic
1719
from stac_fastapi.core.serializers import CollectionSerializer, ItemSerializer
1820
from stac_fastapi.core.utilities import bbox2polygon, get_max_limit
@@ -25,6 +27,7 @@
2527
AsyncOpensearchSettings as AsyncSearchSettings,
2628
)
2729
from stac_fastapi.opensearch.config import OpensearchSettings as SyncSearchSettings
30+
from stac_fastapi.sfeos_helpers import filter as filter_module
2831
from stac_fastapi.sfeos_helpers.database import (
2932
apply_free_text_filter_shared,
3033
apply_intersects_filter_shared,
@@ -64,9 +67,6 @@
6467
from stac_fastapi.types.errors import ConflictError, NotFoundError
6568
from stac_fastapi.types.links import resolve_links
6669
from stac_fastapi.types.stac import Collection, Item
67-
from starlette.requests import Request
68-
69-
from stac_fastapi.sfeos_helpers import filter as filter_module
7070

7171
logger = logging.getLogger(__name__)
7272

@@ -388,17 +388,19 @@ def apply_bbox_filter(search: Search, bbox: List):
388388
a geo_shape filter is added to the search object, set to intersect with the specified polygon.
389389
"""
390390
return search.filter(
391-
Q({
392-
"geo_shape": {
393-
"geometry": {
394-
"shape": {
395-
"type": "polygon",
396-
"coordinates": bbox2polygon(*bbox),
397-
},
398-
"relation": "intersects",
391+
Q(
392+
{
393+
"geo_shape": {
394+
"geometry": {
395+
"shape": {
396+
"type": "polygon",
397+
"coordinates": bbox2polygon(*bbox),
398+
},
399+
"relation": "intersects",
400+
}
399401
}
400402
}
401-
})
403+
)
402404
)
403405

404406
@staticmethod

stac_fastapi/sfeos_helpers/stac_fastapi/sfeos_helpers/filter/client.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,12 @@ async def get_queryables(
5353
return queryables
5454

5555
properties: Dict[str, Any] = queryables["properties"].copy()
56-
queryables.update({
57-
"properties": properties,
58-
"additionalProperties": False,
59-
})
56+
queryables.update(
57+
{
58+
"properties": properties,
59+
"additionalProperties": False,
60+
}
61+
)
6062

6163
mapping_data = await self.database.get_items_mapping(collection_id)
6264
mapping_properties = next(iter(mapping_data.values()))["mappings"]["properties"]

0 commit comments

Comments
 (0)