From 7432c6de84796f9886b38e65f3039d6210bad726 Mon Sep 17 00:00:00 2001 From: link2xt Date: Thu, 15 Aug 2024 16:20:02 +0000 Subject: [PATCH] chore(deltachat-rpc-client): fix ruff 0.6.0 warnings --- deltachat-rpc-client/src/deltachat_rpc_client/pytestplugin.py | 4 ++-- deltachat-rpc-client/tests/test_iroh_webxdc.py | 3 ++- deltachat-rpc-client/tests/test_securejoin.py | 1 + deltachat-rpc-client/tests/test_something.py | 1 + 4 files changed, 6 insertions(+), 3 deletions(-) diff --git a/deltachat-rpc-client/src/deltachat_rpc_client/pytestplugin.py b/deltachat-rpc-client/src/deltachat_rpc_client/pytestplugin.py index dbc1bb274..63f42b1b3 100644 --- a/deltachat-rpc-client/src/deltachat_rpc_client/pytestplugin.py +++ b/deltachat-rpc-client/src/deltachat_rpc_client/pytestplugin.py @@ -114,13 +114,13 @@ class ACFactory: return to_client.run_until(lambda e: e.kind == EventType.INCOMING_MSG) -@pytest.fixture() +@pytest.fixture def rpc(tmp_path) -> AsyncGenerator: rpc_server = Rpc(accounts_dir=str(tmp_path / "accounts")) with rpc_server: yield rpc_server -@pytest.fixture() +@pytest.fixture def acfactory(rpc) -> AsyncGenerator: return ACFactory(DeltaChat(rpc)) diff --git a/deltachat-rpc-client/tests/test_iroh_webxdc.py b/deltachat-rpc-client/tests/test_iroh_webxdc.py index 3d77ab98e..ab99ebb60 100644 --- a/deltachat-rpc-client/tests/test_iroh_webxdc.py +++ b/deltachat-rpc-client/tests/test_iroh_webxdc.py @@ -12,10 +12,11 @@ import threading import time import pytest + from deltachat_rpc_client import EventType -@pytest.fixture() +@pytest.fixture def path_to_webxdc(request): p = request.path.parent.parent.parent.joinpath("test-data/webxdc/chess.xdc") assert p.exists() diff --git a/deltachat-rpc-client/tests/test_securejoin.py b/deltachat-rpc-client/tests/test_securejoin.py index f9b230ef0..da7b6090e 100644 --- a/deltachat-rpc-client/tests/test_securejoin.py +++ b/deltachat-rpc-client/tests/test_securejoin.py @@ -1,6 +1,7 @@ import logging import pytest + from deltachat_rpc_client import Chat, EventType, SpecialContactId diff --git a/deltachat-rpc-client/tests/test_something.py b/deltachat-rpc-client/tests/test_something.py index 655291a5e..0449c5beb 100644 --- a/deltachat-rpc-client/tests/test_something.py +++ b/deltachat-rpc-client/tests/test_something.py @@ -8,6 +8,7 @@ import time from unittest.mock import MagicMock import pytest + from deltachat_rpc_client import Contact, EventType, Message, events from deltachat_rpc_client.const import DownloadState, MessageState from deltachat_rpc_client.direct_imap import DirectImap