Skip to content

Commit 88c144a

Browse files
authored
ci: merge main to relase (ietf-tools#9401)
2 parents b36ecbd + 58f8bbd commit 88c144a

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

ietf/api/__init__.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,14 +62,14 @@ def generate_cache_key(self, *args, **kwargs):
6262
# Use a list plus a ``.join()`` because it's faster than concatenation.
6363
return "%s:%s:%s:%s" % (self._meta.api_name, self._meta.resource_name, ':'.join(args), smooshed)
6464

65-
def _z_aware_fromisoformat(self, value):
66-
"""datetime.datetie.fromisoformat replacement that works with python < 3.11"""
65+
def _z_aware_fromisoformat(self, value: str) -> datetime.datetime:
66+
"""datetime.datetime.fromisoformat replacement that works with python < 3.11"""
6767
if HAVE_BROKEN_FROMISOFORMAT:
6868
if value.upper().endswith("Z"):
6969
value = value[:-1] + "+00:00" # Z -> UTC
7070
elif re.match(r"[+-][0-9][0-9]$", value[-3:]):
7171
value = value + ":00" # -04 -> -04:00
72-
return value
72+
return datetime.datetime.fromisoformat(value)
7373

7474
def filter_value_to_python(
7575
self, value, field_name, filters, filter_expr, filter_type

0 commit comments

Comments
 (0)