From 2d5fe7e70ae89f34dea8d0a0338533333f48eccc Mon Sep 17 00:00:00 2001 From: Denis Laxalde Date: Thu, 28 Oct 2021 10:55:21 +0200 Subject: [PATCH] Add a couple of "# type: ignore" in datetime tests Mypy cannot check map() calls on split-strings. --- tests/types/test_datetime.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/types/test_datetime.py b/tests/types/test_datetime.py index a5484db72..7d51cfa02 100644 --- a/tests/types/test_datetime.py +++ b/tests/types/test_datetime.py @@ -672,7 +672,10 @@ def as_time(s): else: off = None - rv = dt.time(*map(int, s.split(","))) if "," in s else getattr(dt.time, s) + if "," in s: + rv = dt.time(*map(int, s.split(","))) # type: ignore[arg-type] + else: + rv = getattr(dt.time, s) if off: rv = rv.replace(tzinfo=as_tzinfo(off)) @@ -692,7 +695,7 @@ def as_dt(s): def as_naive_dt(s): if "," in s: - rv = dt.datetime(*map(int, s.split(","))) + rv = dt.datetime(*map(int, s.split(","))) # type: ignore[arg-type] else: rv = getattr(dt.datetime, s) -- 2.47.2