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

@ -707,7 +707,7 @@ def test_wrap_unsortable_with_error_and_warning() -> None:
res = list(select(_mixed_iter_errors(), order_value=lambda o: isinstance(o, datetime)))
assert Counter(type(t).__name__ for t in res) == Counter({"_A": 4, "_B": 2, "Unsortable": 1})
# compare the returned error wrapped in the Unsortable
returned_error = next((o for o in res if isinstance(o, Unsortable))).obj
returned_error = next(o for o in res if isinstance(o, Unsortable)).obj
assert "Unhandled error!" == str(returned_error)