feat: adhere to ruff's B rules (#2423)

* feat: adhere to ruff's `B` rules
last of the ruff checks.
closes #2308
* B904
* B008
* B005
* B025
* cleanup on fake
This commit is contained in:
dni ⚡ 2024-04-17 13:11:51 +02:00 committed by GitHub
parent e13a37c193
commit 98ec59df96
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
28 changed files with 226 additions and 169 deletions

View file

@ -62,7 +62,7 @@ def load_funding_source(funding_source: FundingSourceConfig) -> BaseWallet:
custom_settings = funding_source.settings
original_settings = {}
settings = getattr(wallets_module, "settings")
settings = wallets_module.settings
for s in custom_settings:
original_settings[s] = getattr(settings, s)
@ -93,7 +93,7 @@ async def check_assertions(wallet, _test_data: WalletTest):
elif "expect_error" in test_data:
await _assert_error(wallet, tested_func, call_params, _test_data.expect_error)
else:
assert False, "Expected outcome not specified"
raise AssertionError("Expected outcome not specified")
async def _assert_data(wallet, tested_func, call_params, expect):