mirror of
https://github.com/chatmail/core.git
synced 2026-04-24 17:06:28 +03:00
python: rename Deltachat class into DeltaChat
This commit is contained in:
@@ -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'
|
||||
|
||||
@@ -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"])
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user