Skip to content

Commit 7559b3a

Browse files
committed
tests: Ignore timezone requirement flake8 check
Hypothesis need naive object as min/max limits because it constructs the end datetime object using a strategy to set timezones. Signed-off-by: Leandro Lucarella <luca-frequenz@llucax.com>
1 parent 7442780 commit 7559b3a

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

tests/proto/test_datetime.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,10 @@
1515
from frequenz.client.common.proto import datetime_from_proto, datetime_to_proto
1616

1717
# Strategy for generating datetime objects
18+
# It requires naive datetime objects because it creates the timezone via a strategy
1819
datetime_strategy = st.datetimes(
19-
min_value=datetime(1970, 1, 1),
20-
max_value=datetime(9999, 12, 31),
20+
min_value=datetime(1970, 1, 1), # noqa: DTZ001
21+
max_value=datetime(9999, 12, 31), # noqa: DTZ001
2122
timezones=st.just(timezone.utc),
2223
)
2324

0 commit comments

Comments
 (0)