ruff: enable UP ruleset for detecting python deprecations

This commit is contained in:
Dima Gerasimov 2024-08-27 23:12:57 +01:00
parent 2849870773
commit 7eef1f9fc2
9 changed files with 27 additions and 22 deletions

View file

@ -526,9 +526,8 @@ def test_parse_timedelta_string() -> None:
def test_parse_datetime_float() -> None:
pnow = parse_datetime_float("now")
sec_diff = abs((pnow - datetime.now().timestamp()))
sec_diff = abs(pnow - datetime.now().timestamp())
# should probably never fail? could mock time.time
# but there seems to be issues with doing that use C-libraries (as time.time) does
# https://docs.python.org/3/library/unittest.mock-examples.html#partial-mocking