Skip to content

Commit 7e5b618

Browse files
committed
remove type ignores, clean up
1 parent 5930637 commit 7e5b618

File tree

1 file changed

+6
-10
lines changed
  • stac_fastapi/core/stac_fastapi/core

1 file changed

+6
-10
lines changed

stac_fastapi/core/stac_fastapi/core/core.py

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -661,7 +661,7 @@ class TransactionsClient(AsyncBaseTransactionsClient):
661661
@overrides
662662
async def create_item(
663663
self, collection_id: str, item: stac_types.Item, **kwargs
664-
) -> stac_types.Item:
664+
) -> Optional[stac_types.Item]:
665665
"""Create an item in the collection.
666666
667667
Args:
@@ -692,7 +692,7 @@ async def create_item(
692692
collection_id, processed_items, refresh=kwargs.get("refresh", False)
693693
)
694694

695-
return None # type: ignore
695+
return None
696696
else:
697697
item = await self.database.prep_create_item(item=item, base_url=base_url)
698698
await self.database.create_item(item, refresh=kwargs.get("refresh", False))
@@ -730,7 +730,7 @@ async def update_item(
730730
@overrides
731731
async def delete_item(
732732
self, item_id: str, collection_id: str, **kwargs
733-
) -> stac_types.Item:
733+
) -> Optional[stac_types.Item]:
734734
"""Delete an item from a collection.
735735
736736
Args:
@@ -741,7 +741,7 @@ async def delete_item(
741741
Optional[stac_types.Item]: The deleted item, or `None` if the item was successfully deleted.
742742
"""
743743
await self.database.delete_item(item_id=item_id, collection_id=collection_id)
744-
return None # type: ignore
744+
return None
745745

746746
@overrides
747747
async def create_collection(
@@ -810,7 +810,7 @@ async def update_collection(
810810
@overrides
811811
async def delete_collection(
812812
self, collection_id: str, **kwargs
813-
) -> stac_types.Collection:
813+
) -> Optional[stac_types.Collection]:
814814
"""
815815
Delete a collection.
816816
@@ -827,7 +827,7 @@ async def delete_collection(
827827
NotFoundError: If the collection doesn't exist.
828828
"""
829829
await self.database.delete_collection(collection_id=collection_id)
830-
return None # type: ignore
830+
return None
831831

832832

833833
@attr.s
@@ -842,14 +842,10 @@ class BulkTransactionsClient(BaseBulkTransactionsClient):
842842
database: BaseDatabaseLogic = attr.ib()
843843
settings: ApiBaseSettings = attr.ib()
844844
session: Session = attr.ib(default=attr.Factory(Session.create_from_env))
845-
# database = DatabaseLogic()
846845

847846
def __attrs_post_init__(self):
848847
"""Create es engine."""
849-
# settings = BaseSettings()
850848
self.client = self.settings.create_client
851-
# settings = SearchSettings()
852-
# self.client = settings.create_client
853849

854850
def preprocess_item(
855851
self, item: stac_types.Item, base_url, method: BulkTransactionMethod

0 commit comments

Comments
 (0)