1
0
mirror of https://github.com/kellyjonbrazil/jc.git synced 2025-06-17 00:07:37 +02:00

remove more type annotations

This commit is contained in:
Kelly Brazil
2023-01-04 19:17:29 -08:00
parent 12c0b3d889
commit 01e911ecdb

View File

@ -79,7 +79,7 @@ def match_to_datetime(match):
@lru_cache(maxsize=None) @lru_cache(maxsize=None)
def cached_tz(hour_str: str, minute_str: str, sign_str: str) -> timezone: def cached_tz(hour_str, minute_str, sign_str):
sign = 1 if sign_str == "+" else -1 sign = 1 if sign_str == "+" else -1
return timezone( return timezone(
timedelta( timedelta(
@ -89,7 +89,7 @@ def cached_tz(hour_str: str, minute_str: str, sign_str: str) -> timezone:
) )
def match_to_localtime(match: re.Match) -> time: def match_to_localtime(match):
hour_str, minute_str, sec_str, micros_str = match.groups() hour_str, minute_str, sec_str, micros_str = match.groups()
micros = int(micros_str.ljust(6, "0")) if micros_str else 0 micros = int(micros_str.ljust(6, "0")) if micros_str else 0
return time(int(hour_str), int(minute_str), int(sec_str), micros) return time(int(hour_str), int(minute_str), int(sec_str), micros)