From 3cdbe213a36c793af37ee48ef73fb1565e00208b Mon Sep 17 00:00:00 2001 From: link2xt Date: Sun, 4 Dec 2022 13:56:53 +0000 Subject: [PATCH] python: rename Deltachat class into DeltaChat --- deltachat-rpc-client/README.md | 2 +- deltachat-rpc-client/examples/echobot.py | 2 +- deltachat-rpc-client/src/deltachat_rpc_client/__init__.py | 2 +- deltachat-rpc-client/src/deltachat_rpc_client/deltachat.py | 2 +- .../src/deltachat_rpc_client/pytestplugin.py | 6 +++--- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/deltachat-rpc-client/README.md b/deltachat-rpc-client/README.md index 647dec7c2..0973244f4 100644 --- a/deltachat-rpc-client/README.md +++ b/deltachat-rpc-client/README.md @@ -33,7 +33,7 @@ $ PATH="../target/debug:$PATH" ipython In [1]: from deltachat_rpc_client import * In [2]: rpc = Rpc() In [3]: await rpc.start() -In [4]: dc = Deltachat(rpc) +In [4]: dc = DeltaChat(rpc) In [5]: system_info = await dc.get_system_info() In [6]: system_info["level"] Out[6]: 'awesome' diff --git a/deltachat-rpc-client/examples/echobot.py b/deltachat-rpc-client/examples/echobot.py index 136b65795..3ca4f6bf8 100755 --- a/deltachat-rpc-client/examples/echobot.py +++ b/deltachat-rpc-client/examples/echobot.py @@ -8,7 +8,7 @@ import deltachat_rpc_client as dc async def main(): async with dc.Rpc() as rpc: - deltachat = dc.Deltachat(rpc) + deltachat = dc.DeltaChat(rpc) system_info = await deltachat.get_system_info() logging.info("Running deltachat core %s", system_info["deltachat_core_version"]) diff --git a/deltachat-rpc-client/src/deltachat_rpc_client/__init__.py b/deltachat-rpc-client/src/deltachat_rpc_client/__init__.py index 4b25df47d..560d4b7d1 100644 --- a/deltachat-rpc-client/src/deltachat_rpc_client/__init__.py +++ b/deltachat-rpc-client/src/deltachat_rpc_client/__init__.py @@ -1,5 +1,5 @@ from .account import Account from .contact import Contact -from .deltachat import Deltachat +from .deltachat import DeltaChat from .message import Message from .rpc import Rpc diff --git a/deltachat-rpc-client/src/deltachat_rpc_client/deltachat.py b/deltachat-rpc-client/src/deltachat_rpc_client/deltachat.py index 5a9a1ec80..2414fbb94 100644 --- a/deltachat-rpc-client/src/deltachat_rpc_client/deltachat.py +++ b/deltachat-rpc-client/src/deltachat_rpc_client/deltachat.py @@ -4,7 +4,7 @@ from .account import Account from .rpc import Rpc -class Deltachat: +class DeltaChat: """ Delta Chat account manager. This is the root of the object oriented API. diff --git a/deltachat-rpc-client/src/deltachat_rpc_client/pytestplugin.py b/deltachat-rpc-client/src/deltachat_rpc_client/pytestplugin.py index a3eb4341c..0e1be118b 100644 --- a/deltachat-rpc-client/src/deltachat_rpc_client/pytestplugin.py +++ b/deltachat-rpc-client/src/deltachat_rpc_client/pytestplugin.py @@ -7,7 +7,7 @@ import aiohttp import pytest_asyncio from .account import Account -from .deltachat import Deltachat +from .deltachat import DeltaChat from .rpc import Rpc @@ -20,7 +20,7 @@ async def get_temp_credentials() -> dict: class ACFactory: - def __init__(self, deltachat: Deltachat) -> None: + def __init__(self, deltachat: DeltaChat) -> None: self.deltachat = deltachat async def new_configured_account(self) -> Account: @@ -49,4 +49,4 @@ async def rpc(tmp_path) -> AsyncGenerator: @pytest_asyncio.fixture async def acfactory(rpc) -> AsyncGenerator: - yield ACFactory(Deltachat(rpc)) + yield ACFactory(DeltaChat(rpc))