Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a64a1c9 commit 67f5c5bCopy full SHA for 67f5c5b
1 file changed
Lib/tomllib/_re.py
@@ -84,6 +84,9 @@ def match_to_datetime(match: re.Match) -> datetime | date:
84
return datetime(year, month, day, hour, minute, sec, micros, tzinfo=tz)
85
86
87
+# No need to limit cache size. This is only ever called on input
88
+# that matched RE_DATETIME, so there is an implicit bound of
89
+# 24 (hours) * 60 (minutes) * 2 (offset direction) = 2880.
90
@lru_cache(maxsize=None)
91
def cached_tz(hour_str: str, minute_str: str, sign_str: str) -> timezone:
92
sign = 1 if sign_str == "+" else -1
0 commit comments