ruff: enable RUF ruleset
This commit is contained in:
parent
dc0726c347
commit
c3da26abcb
15 changed files with 31 additions and 27 deletions
|
@ -153,7 +153,7 @@ def test_sort_res_by() -> None:
|
|||
Exc('last'),
|
||||
]
|
||||
|
||||
results2 = sort_res_by(ress + [0], lambda x: int(x))
|
||||
results2 = sort_res_by([*ress, 0], lambda x: int(x))
|
||||
assert results2 == [Exc('last'), 0] + results[:-1]
|
||||
|
||||
assert sort_res_by(['caba', 'a', 'aba', 'daba'], key=lambda x: len(x)) == ['a', 'aba', 'caba', 'daba']
|
||||
|
@ -166,7 +166,7 @@ def test_sort_res_by() -> None:
|
|||
def set_error_datetime(e: Exception, dt: Optional[datetime]) -> None:
|
||||
if dt is None:
|
||||
return
|
||||
e.args = e.args + (dt,)
|
||||
e.args = (*e.args, dt)
|
||||
# todo not sure if should return new exception?
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue