chore: fix some types in deltachat_rpc_client

This commit is contained in:
link2xt
2026-09-16 09:32:48 +00:00
committed by l
parent f03088f247
commit 15488ed210
4 changed files with 5 additions and 5 deletions

View File

@@ -272,7 +272,7 @@ class Account:
return Contact(self, SpecialContactId.SELF) return Contact(self, SpecialContactId.SELF)
@property @property
def device_contact(self) -> Chat: def device_contact(self) -> Contact:
"""Account's device contact.""" """Account's device contact."""
return Contact(self, SpecialContactId.DEVICE) return Contact(self, SpecialContactId.DEVICE)

View File

@@ -121,7 +121,7 @@ class Message:
yield self._rpc.send_webxdc_realtime_advertisement.future(self.account.id, self.id) yield self._rpc.send_webxdc_realtime_advertisement.future(self.account.id, self.id)
@futuremethod @futuremethod
def send_webxdc_realtime_data(self, data) -> None: def send_webxdc_realtime_data(self, data):
"""Send data to the realtime channel.""" """Send data to the realtime channel."""
yield self._rpc.send_webxdc_realtime_data.future(self.account.id, self.id, list(data)) yield self._rpc.send_webxdc_realtime_data.future(self.account.id, self.id, list(data))

View File

@@ -76,7 +76,7 @@ class RPCAccountFactory:
"""Create a new unconfigured bot.""" """Create a new unconfigured bot."""
return Bot(self.get_unconfigured_account()) 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.""" """Generate new credentials for chatmail account."""
domain = os.environ["CHATMAIL_DOMAIN"] domain = os.environ["CHATMAIL_DOMAIN"]
username = "ci-" + "".join(random.choice("2345789acdefghjkmnpqrstuvwxyz") for i in range(6)) username = "ci-" + "".join(random.choice("2345789acdefghjkmnpqrstuvwxyz") for i in range(6))

View File

@@ -2,7 +2,7 @@ from __future__ import annotations
from typing import TYPE_CHECKING from typing import TYPE_CHECKING
from deltachat_rpc_client import Account, EventType, const from deltachat_rpc_client import EventType, const
if TYPE_CHECKING: if TYPE_CHECKING:
from deltachat_rpc_client.pytestplugin import RPCAccountFactory 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) 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, bob = acf.get_online_accounts(2)
alice_contact_bob = alice.create_contact(bob, "Bob") alice_contact_bob = alice.create_contact(bob, "Bob")