Skip to content

Commit

Permalink
fix: fixed type errors
Browse files Browse the repository at this point in the history
  • Loading branch information
ErikBjare committed Feb 3, 2025
1 parent f888dae commit 092337a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion aw_notify/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
logger = logging.getLogger(__name__)

# Types
AwClient = aw_client.ActivityWatchClient
AwClient: TypeAlias = aw_client.ActivityWatchClient
CacheKey: TypeAlias = tuple

# Constants
Expand Down Expand Up @@ -91,6 +91,7 @@ def get_time(date=None, top_level_only=True) -> dict[str, timedelta]:
Might throw exceptions if the query fails.
"""
assert aw
if date is None:
date = datetime.now(timezone.utc)
date = date.replace(hour=0, minute=0, second=0, microsecond=0)
Expand Down Expand Up @@ -429,6 +430,7 @@ def send_checkin_yesterday():

def check_server_availability() -> bool:
"""Check if the ActivityWatch server is available."""
assert aw
try:
aw.get_info()
return True
Expand Down

0 comments on commit 092337a

Please sign in to comment.