diff --git a/beekeepy/beekeepy/_communication/abc/rules.py b/beekeepy/beekeepy/_communication/abc/rules.py index 335f83aec746d2e094f3c8bb663226c1093933ec..a87c0c5ec069264db260c1417fd0bd087ccfd8b2 100644 --- a/beekeepy/beekeepy/_communication/abc/rules.py +++ b/beekeepy/beekeepy/_communication/abc/rules.py @@ -76,7 +76,7 @@ class OverseerRule(ABC): assert isinstance(self.request, dict), f"self.request is not a dict, nor list, but is `{type(self.request)}`" return self.request - def _construct_exception( # noqa: PLR0913 + def _construct_exception( self, error_cls: type[OverseerError], response: Json | list[Json] | Exception, diff --git a/beekeepy/beekeepy/_remote_handle/beekeeper.py b/beekeepy/beekeepy/_remote_handle/beekeeper.py index 4d077cde955676acd64e29524a106a3531bd4458..cd21bb100b2517c69efbe1ef52333237ff580c3f 100644 --- a/beekeepy/beekeepy/_remote_handle/beekeeper.py +++ b/beekeepy/beekeepy/_remote_handle/beekeeper.py @@ -32,7 +32,7 @@ def _raise_acquire_not_possible() -> NoReturn: class _SyncSessionBatchHandle(SyncBatchHandle[BeekeeperSyncApiCollection], SyncSessionHolder): - def __init__( # noqa: PLR0913 + def __init__( self, url: HttpUrl, overseer: AbstractOverseer, @@ -50,7 +50,7 @@ class _SyncSessionBatchHandle(SyncBatchHandle[BeekeeperSyncApiCollection], SyncS class _AsyncSessionBatchHandle(AsyncBatchHandle[BeekeeperAsyncApiCollection], AsyncSessionHolder): - def __init__( # noqa: PLR0913 + def __init__( self, url: HttpUrl, overseer: AbstractOverseer, diff --git a/tests/beekeepy_test/conftest.py b/tests/beekeepy_test/conftest.py index 2944d1285ed986db62d6bc05605baf861063c623..7b2eafc0f4d714ce840ac5278fbc656377256d06 100644 --- a/tests/beekeepy_test/conftest.py +++ b/tests/beekeepy_test/conftest.py @@ -15,7 +15,7 @@ if TYPE_CHECKING: from loguru import Logger -@pytest.fixture() +@pytest.fixture def settings(working_directory: Path) -> SettingsFactory: @wraps(settings) def _factory(settings_update: Settings | None = None) -> Settings: @@ -28,7 +28,7 @@ def settings(working_directory: Path) -> SettingsFactory: return _factory -@pytest.fixture() +@pytest.fixture def settings_with_logger(request: pytest.FixtureRequest, settings: SettingsFactory) -> Iterator[SettingsLoggerFactory]: handlers_to_remove = [] diff --git a/tests/beekeepy_test/handle/commandline/conftest.py b/tests/beekeepy_test/handle/commandline/conftest.py index 625860c498c12b96ab25ac8fd57a00c3bc18a9f6..2b34069b9484cb77ae4f72e026bf32b73922f6d3 100644 --- a/tests/beekeepy_test/handle/commandline/conftest.py +++ b/tests/beekeepy_test/handle/commandline/conftest.py @@ -10,7 +10,7 @@ if TYPE_CHECKING: from local_tools.beekeepy.models import SettingsLoggerFactory -@pytest.fixture() +@pytest.fixture def beekeeper_exe(settings_with_logger: SettingsLoggerFactory) -> BeekeeperExecutable: incoming_settings, logger = settings_with_logger() return BeekeeperExecutable(settings=incoming_settings, logger=logger) diff --git a/tests/beekeepy_test/handle/conftest.py b/tests/beekeepy_test/handle/conftest.py index 3063076fe11b2af56a53ec9662405b22539726ff..d13ae688ce8357e60871ea298147ff834e067037 100644 --- a/tests/beekeepy_test/handle/conftest.py +++ b/tests/beekeepy_test/handle/conftest.py @@ -20,7 +20,7 @@ from local_tools.beekeepy.models import ( from beekeepy.handle.runnable import Beekeeper -@pytest.fixture() +@pytest.fixture def beekeeper_not_started(settings_with_logger: SettingsLoggerFactory) -> Iterator[Beekeeper]: incoming_settings, logger = settings_with_logger() bk = Beekeeper(settings=incoming_settings, logger=logger) @@ -31,20 +31,20 @@ def beekeeper_not_started(settings_with_logger: SettingsLoggerFactory) -> Iterat bk.teardown() -@pytest.fixture() +@pytest.fixture def beekeeper(beekeeper_not_started: Beekeeper) -> Iterator[Beekeeper]: with beekeeper_not_started as bk: yield bk -@pytest.fixture() +@pytest.fixture def wallet(beekeeper: Beekeeper) -> WalletInfo: name, password = default_wallet_credentials() beekeeper.api.create(wallet_name=name, password=password) return WalletInfo(name=name, password=password) -@pytest.fixture() +@pytest.fixture def account(beekeeper: Beekeeper, wallet: WalletInfo) -> AccountCredentials: acc = AccountCredentials.create() beekeeper.api.import_key(wallet_name=wallet.name, wif_key=acc.private_key) @@ -56,7 +56,7 @@ def keys_to_import() -> list[AccountCredentials]: return AccountCredentials.create_multiple(10) -@pytest.fixture() +@pytest.fixture def setup_wallets(beekeeper: Beekeeper) -> WalletsGeneratorT: @wraps(setup_wallets) def __setup_wallets( diff --git a/tests/beekeepy_test/handle/various/test_blocking_unlock.py b/tests/beekeepy_test/handle/various/test_blocking_unlock.py index 8eb8edd32e5a2b7b45dd53c9e4bd28e6093d3830..c36d4e589d0d3a99c4759f49d71e0461be4770aa 100644 --- a/tests/beekeepy_test/handle/various/test_blocking_unlock.py +++ b/tests/beekeepy_test/handle/various/test_blocking_unlock.py @@ -22,7 +22,7 @@ AES_DECRYPTION_ERROR: Final[str] = "Invalid password for wallet" WALLET_UNACCESSIBLE_ERROR: Final[str] = "Assert Exception:false: unlock is not accessible" -@pytest.fixture() +@pytest.fixture def beekeeper_not_started(settings_with_logger: SettingsLoggerFactory) -> Iterator[AsyncBeekeeper]: incoming_settings, logger = settings_with_logger() bk = AsyncBeekeeper(settings=incoming_settings, logger=logger) @@ -33,13 +33,13 @@ def beekeeper_not_started(settings_with_logger: SettingsLoggerFactory) -> Iterat bk.teardown() -@pytest.fixture() +@pytest.fixture async def beekeeper(beekeeper_not_started: AsyncBeekeeper) -> AsyncIterator[AsyncBeekeeper]: async with beekeeper_not_started as bk: yield bk -@pytest.fixture() +@pytest.fixture async def wallet(beekeeper: AsyncBeekeeper) -> WalletInfo: name, password = default_wallet_credentials() await beekeeper.api.create(wallet_name=name, password=password) diff --git a/tests/beekeepy_test/interface/test_invalidated_state.py b/tests/beekeepy_test/interface/test_invalidated_state.py index bcc797bec31a28d54f39f017242e80b9f1aafa12..96eb4f2f5690c897ec388ec88774db1ec6dfa0fc 100644 --- a/tests/beekeepy_test/interface/test_invalidated_state.py +++ b/tests/beekeepy_test/interface/test_invalidated_state.py @@ -14,7 +14,7 @@ if TYPE_CHECKING: from beekeepy import Session, Wallet -@pytest.fixture() +@pytest.fixture def beekeepy_interfaces(settings: SettingsFactory) -> Iterator[tuple[Beekeeper, Session, Wallet]]: bk = Beekeeper.factory(settings=settings()) session = bk.create_session() diff --git a/tests/conftest.py b/tests/conftest.py index d0847cce7e7c346bc32e4721fe77097212bfeefe..8e438830e8d538f846eb8fff8fb00c3f37f1d3dd 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -44,13 +44,13 @@ def pytest_addoption(parser: pytest.Parser) -> None: ) -@pytest.fixture() +@pytest.fixture def registered_apis() -> RegisteredApisT: """Return registered methods.""" return AbstractApi._get_registered_methods() -@pytest.fixture() +@pytest.fixture def hived_http_endpoint(request: pytest.FixtureRequest) -> HttpUrl: raw_url = request.config.getoption("--hived-http-endpoint") assert raw_url is not None