chore: adhere to ruff's RUF rules, 2nd try (#2420)

* chore: adhere to ruff's `RUF` rules, 2nd try
closes #2382
This commit is contained in:
dni ⚡ 2024-04-17 07:36:22 +02:00 committed by GitHub
parent d78f6a1f9e
commit daa1b5a313
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
13 changed files with 36 additions and 28 deletions

View file

@ -120,7 +120,7 @@ class WalletTest(BaseModel):
self.dict()
| {
"description": f"""{self.description}:{mock.description or ""}""",
"mocks": self.mocks + [mock],
"mocks": [*self.mocks, mock],
"skip": self.skip or mock.skip,
}
)

View file

@ -1,5 +1,7 @@
import functools
import importlib
import json
import operator
from typing import Dict, List
import pytest
@ -24,7 +26,9 @@ def wallet_fixtures_from_json(path) -> List["WalletTest"]:
fn_tests = _tests_for_function(funding_sources, fn_name, fn)
_merge_dict_of_lists(tests, fn_tests)
all_tests = sum([tests[fs_name] for fs_name in tests], [])
all_tests: list["WalletTest"] = functools.reduce(
operator.iadd, [tests[fs_name] for fs_name in tests], []
)
return all_tests