Skip to content

Commit df42346

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 3cd3e32 commit df42346

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

tests/test_conversion.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,10 @@
1515
from frequenz.client.base.conversion import to_datetime, to_timestamp
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)