Skip to content

Commit

Permalink
removed duplicate function
Browse files Browse the repository at this point in the history
  • Loading branch information
ilongin committed Sep 6, 2024
1 parent c25c0b3 commit 4aeeea1
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions src/datachain/lib/listing.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,13 +105,6 @@ def listing_uri_from_name(dataset_name: str) -> str:
return dataset_name.removeprefix(LISTING_PREFIX)


def listing_uri_from_name(dataset_name: str) -> str:
"""Returns clean storage URI from listing dataset name"""
if not is_listing_dataset(dataset_name):
raise ValueError(f"Dataset {dataset_name} is not a listing")
return dataset_name.removeprefix(LISTING_PREFIX)


def is_listing_expired(created_at: datetime) -> bool:
"""Checks if listing has expired based on it's creation date"""
return datetime.now(timezone.utc) > created_at + timedelta(seconds=LISTING_TTL)
Expand Down

0 comments on commit 4aeeea1

Please sign in to comment.