Skip to content

Commit 2e7073c

Browse files
committed
run pre-commit
1 parent 7542398 commit 2e7073c

File tree

1 file changed

+5
-3
lines changed
  • stac_fastapi/elasticsearch/stac_fastapi/elasticsearch

1 file changed

+5
-3
lines changed

stac_fastapi/elasticsearch/stac_fastapi/elasticsearch/core.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ def all_collections(self, **kwargs) -> Collections:
5757
index="stac_collections", doc_type="_doc", query={"match_all": {}}
5858
)
5959
except elasticsearch.exceptions.NotFoundError:
60-
raise NotFoundError(f"No collections exist in the database yet")
60+
raise NotFoundError("No collections exist in the database yet")
6161
serialized_collections = [
6262
self.collection_serializer.db_to_stac(
6363
collection["_source"], base_url=base_url
@@ -111,7 +111,7 @@ def item_collection(
111111
try:
112112
count = search.count()
113113
except elasticsearch.exceptions.NotFoundError:
114-
raise NotFoundError(f"No items exist for this collection yet")
114+
raise NotFoundError("No items exist for this collection yet")
115115
# search = search.sort({"id.keyword" : {"order" : "asc"}})
116116
search = search.query()[0:limit]
117117
collection_children = search.execute().to_dict()
@@ -142,7 +142,9 @@ def get_item(self, item_id: str, collection_id: str, **kwargs) -> Item:
142142
try:
143143
item = self.client.get(index="stac_items", id=item_id)
144144
except elasticsearch.exceptions.NotFoundError:
145-
raise NotFoundError(f"Item {item_id} does not exist in Collection {collection_id}")
145+
raise NotFoundError(
146+
f"Item {item_id} does not exist in Collection {collection_id}"
147+
)
146148
return self.item_serializer.db_to_stac(item["_source"], base_url)
147149

148150
def _return_date(self, datetime):

0 commit comments

Comments
 (0)