diff --git a/deltachat-rpc-client/src/deltachat_rpc_client/account.py b/deltachat-rpc-client/src/deltachat_rpc_client/account.py index 06cd3d3b5..748df661c 100644 --- a/deltachat-rpc-client/src/deltachat_rpc_client/account.py +++ b/deltachat-rpc-client/src/deltachat_rpc_client/account.py @@ -272,7 +272,7 @@ class Account: return Contact(self, SpecialContactId.SELF) @property - def device_contact(self) -> Chat: + def device_contact(self) -> Contact: """Account's device contact.""" return Contact(self, SpecialContactId.DEVICE) diff --git a/deltachat-rpc-client/src/deltachat_rpc_client/message.py b/deltachat-rpc-client/src/deltachat_rpc_client/message.py index 86b354d5a..68976f5e9 100644 --- a/deltachat-rpc-client/src/deltachat_rpc_client/message.py +++ b/deltachat-rpc-client/src/deltachat_rpc_client/message.py @@ -121,7 +121,7 @@ class Message: yield self._rpc.send_webxdc_realtime_advertisement.future(self.account.id, self.id) @futuremethod - def send_webxdc_realtime_data(self, data) -> None: + def send_webxdc_realtime_data(self, data): """Send data to the realtime channel.""" yield self._rpc.send_webxdc_realtime_data.future(self.account.id, self.id, list(data)) diff --git a/deltachat-rpc-client/src/deltachat_rpc_client/pytestplugin.py b/deltachat-rpc-client/src/deltachat_rpc_client/pytestplugin.py index 0abccde4e..a901cbd5a 100644 --- a/deltachat-rpc-client/src/deltachat_rpc_client/pytestplugin.py +++ b/deltachat-rpc-client/src/deltachat_rpc_client/pytestplugin.py @@ -76,7 +76,7 @@ class RPCAccountFactory: """Create a new unconfigured bot.""" return Bot(self.get_unconfigured_account()) - def get_credentials(self) -> (str, str): + def get_credentials(self) -> tuple[str, str]: """Generate new credentials for chatmail account.""" domain = os.environ["CHATMAIL_DOMAIN"] username = "ci-" + "".join(random.choice("2345789acdefghjkmnpqrstuvwxyz") for i in range(6)) diff --git a/deltachat-rpc-client/tests/test_chatlist_events.py b/deltachat-rpc-client/tests/test_chatlist_events.py index e52404a6e..36232d4e8 100644 --- a/deltachat-rpc-client/tests/test_chatlist_events.py +++ b/deltachat-rpc-client/tests/test_chatlist_events.py @@ -2,7 +2,7 @@ from __future__ import annotations from typing import TYPE_CHECKING -from deltachat_rpc_client import Account, EventType, const +from deltachat_rpc_client import EventType, const if TYPE_CHECKING: from deltachat_rpc_client.pytestplugin import RPCAccountFactory @@ -144,7 +144,7 @@ def test_download_on_demand(acf: RPCAccountFactory, rpcdata) -> None: wait_for_chatlist_specific_item(alice, chat_id) -def get_multi_account_test_setup(acf: RPCAccountFactory) -> [Account, Account, Account]: +def get_multi_account_test_setup(acf: RPCAccountFactory) -> list: alice, bob = acf.get_online_accounts(2) alice_contact_bob = alice.create_contact(bob, "Bob")