MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / cached_tz

Function cached_tz

tools/python-3.11.9-amd64/Lib/tomllib/_re.py:88–95  ·  view source on GitHub ↗
(hour_str: str, minute_str: str, sign_str: str)

Source from the content-addressed store, hash-verified

86
87@lru_cache(maxsize=None)
88def cached_tz(hour_str: str, minute_str: str, sign_str: str) -> timezone:
89 sign = 1 if sign_str == "+" else -1
90 return timezone(
91 timedelta(
92 hours=sign * int(hour_str),
93 minutes=sign * int(minute_str),
94 )
95 )
96
97
98def match_to_localtime(match: re.Match) -> time:

Callers 1

match_to_datetimeFunction · 0.70

Calls 2

timezoneClass · 0.90
timedeltaClass · 0.90

Tested by

no test coverage detected