Skip to content

Commit

Permalink
Remove unused ensure_aware() function
Browse files Browse the repository at this point in the history
  • Loading branch information
jwodder committed Nov 9, 2023
1 parent 643b7a2 commit cfaa79b
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 cfaa79b

Please sign in to comment.