Skip to content

Commit

Permalink
Replaced abstract tzinfo with ZoneInfo as a concrete type.
Browse files Browse the repository at this point in the history
  • Loading branch information
junhaoliao committed Apr 21, 2024
1 parent 2b79bff commit 151198f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/clp_logging/readers.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from abc import ABCMeta, abstractmethod
from datetime import datetime, tzinfo
from datetime import datetime
from pathlib import Path
from sys import stderr
from types import TracebackType
Expand Down Expand Up @@ -67,7 +67,7 @@ def __init__(self) -> None:
def __str__(self) -> str:
return self.formatted_msg

def _decode(self, timestamp_format: Optional[str], timezone: Optional[tzinfo]) -> int:
def _decode(self, timestamp_format: Optional[str], timezone: Optional[ZoneInfo]) -> int:
"""
Populate the `variables`, `msg`, and `formatted_msg` fields by decoding
the encoded `encoded_logtype and `encoded_variables`.
Expand Down Expand Up @@ -154,7 +154,7 @@ def __init__(self, timestamp_format: Optional[str], chunk_size: int) -> None:
self.metadata: Optional[Metadata] = None
self.last_timestamp_ms: int
self.timestamp_format: Optional[str] = timestamp_format
self.timezone: Optional[tzinfo]
self.timezone: Optional[ZoneInfo]
self.pos: int

def read_preamble(self) -> int:
Expand Down

0 comments on commit 151198f

Please sign in to comment.