Skip to content

Commit

Permalink
Merge pull request #174 from con/unused
Browse files Browse the repository at this point in the history
Remove unused `ensure_aware()` function
  • Loading branch information
jwodder authored Nov 9, 2023
2 parents 1e79d32 + cfaa79b commit c9b9a9a
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions src/tinuous/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,6 @@
log = logging.getLogger("tinuous")


def ensure_aware(dt: datetime) -> datetime:
# Pygithub returns naïve datetimes for timestamps with a "Z" suffix. Until
# that's fixed <https://github.com/PyGithub/PyGithub/pull/1831>, we need to
# make such datetimes timezone-aware manually.
return dt.replace(tzinfo=timezone.utc) if dt.tzinfo is None else dt


def removeprefix(s: str, prefix: str) -> str:
n = len(prefix)
return s[n:] if s[:n] == prefix else s
Expand Down

0 comments on commit c9b9a9a

Please sign in to comment.