Skip to content

Commit

Permalink
fix typos, add delete return annotation
Browse files Browse the repository at this point in the history
  • Loading branch information
Ariana Barzinpour committed May 1, 2024
1 parent e8813f4 commit ed1f931
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion datacube/index/abstract.py
Expand Up @@ -642,7 +642,7 @@ def add_document(self, definition: JsonDict) -> Product:
return self.add(type_)

@abstractmethod
def delete(self, product: Product):
def delete(self, product: Product) -> None:
"""
Delete the specified product.
Expand Down
2 changes: 1 addition & 1 deletion datacube/index/postgres/_products.py
Expand Up @@ -230,7 +230,7 @@ def delete(self, product: Product):
"""
Delete a Product, as well as all related datasets
:param product: the Proudct to delete
:param product: the Product to delete
"""
# First find and delete all related datasets
product_datasets = self._index.datasets.search_returning(('id',), archived=None, product=product.name)
Expand Down
2 changes: 1 addition & 1 deletion integration_tests/index/test_config_docs.py
Expand Up @@ -398,7 +398,7 @@ def test_product_delete_cli(index: Index,
extended_eo3_metadata_type: MetadataType) -> None:
from pathlib import Path
TESTDIR = Path(__file__).parent.parent / "data" / "eo3"
# prduct with some archived and some active datasets
# product with some archived and some active datasets
clirunner(['dataset', 'archive', 'c21648b1-a6fa-4de0-9dc3-9c445d8b295a', '4a30d008-4e82-4d67-99af-28bc1629f766'])
runner = clirunner(['product', 'delete', 'ga_ls8c_ard_3'], verbose_flag=False, expect_success=False)
assert "Product ga_ls8c_ard_3 has active datasets" in runner.output
Expand Down

0 comments on commit ed1f931

Please sign in to comment.