Skip to content

Commit bd84128

Browse files
committed
not x in -> x not in
1 parent 506a186 commit bd84128

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

stac_fastapi/opensearch/stac_fastapi/opensearch/database_logic.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@
6565
logger = logging.getLogger(__name__)
6666
ES_MAX_URL_LENGTH = 4096
6767

68+
6869
async def create_index_templates() -> None:
6970
"""
7071
Create index templates for the Collection and Item indices.
@@ -546,15 +547,15 @@ async def execute_search(
546547

547548
index_param = indices(collection_ids)
548549

549-
if len(index_param) > ES_MAX_URL_LENGTH-300:
550+
if len(index_param) > ES_MAX_URL_LENGTH - 300:
550551
index_param = ITEM_INDICES
551552
index_filter = {"terms": {"collection": collection_ids}}
552-
if not "bool" in search_body["query"]:
553+
if "bool" not in search_body["query"]:
553554
search_body["query"]["bool"] = {}
554-
if not "filter" in search_body["query"]["bool"]:
555+
if "filter" not in search_body["query"]["bool"]:
555556
search_body["query"]["bool"]["filter"] = [index_filter]
556557
filters = search_body["query"]["bool"]["filter"]
557-
if not index_filter in filters:
558+
if index_filter not in filters:
558559
filters.append(index_filter)
559560

560561
max_result_window = MAX_LIMIT

0 commit comments

Comments
 (0)