1
0
Fork 0
mirror of https://github.com/deltachat/deltachat-core.git synced 2025-10-04 02:09:17 +02:00

fix linking to classes in sphinx docs

This commit is contained in:
holger krekel 2018-09-26 11:50:27 +02:00
parent f487266489
commit d057aa77d3
3 changed files with 18 additions and 18 deletions

View file

@ -2,7 +2,7 @@ from deltachat import capi, const
from deltachat.capi import ffi
from deltachat.account import Account # noqa
__version__ = "0.5.dev3"
__version__ = "0.5.dev4"
_DC_CALLBACK_MAP = {}

View file

@ -96,9 +96,9 @@ class Account(object):
raise ValueError("need to configure first")
def get_self_contact(self):
""" return this account's identity as a :class:`Contact`.
""" return this account's identity as a :class:`deltachat.chatting.Contact`.
:returns: :class:`Contact`
:returns: :class:`deltachat.chatting.Contact`
"""
self.check_is_configured()
return Contact(self._dc_context, const.DC_CONTACT_ID_SELF)
@ -110,7 +110,7 @@ class Account(object):
:param email: email-address (text type)
:param name: display name for this contact (optional)
:returns: :class:`Contact` instance.
:returns: :class:`deltachat.chatting.Contact` instance.
"""
name = as_dc_charpointer(name)
email = as_dc_charpointer(email)
@ -125,7 +125,7 @@ class Account(object):
whose name or e-mail matches query.
:param only_verified: if true only return verified contacts.
:param with_self: if true the self-contact is also returned.
:returns: list of :class:`Message` objects.
:returns: list of :class:`deltachat.chatting.Message` objects.
"""
flags = 0
query = as_dc_charpointer(query)
@ -143,7 +143,7 @@ class Account(object):
""" create or get an existing 1:1 chat object for the specified contact.
:param contact: chat_id (int) or contact object.
:returns: a :class:`Chat` object.
:returns: a :class:`deltachat.chatting.Chat` object.
"""
contact_id = getattr(contact, "id", contact)
assert isinstance(contact_id, int)
@ -156,7 +156,7 @@ class Account(object):
the specified message.
:param message: messsage id or message instance.
:returns: a :class:`Chat` object.
:returns: a :class:`deltachat.chatting.Chat` object.
"""
msg_id = getattr(message, "id", message)
assert isinstance(msg_id, int)
@ -169,7 +169,7 @@ class Account(object):
Chats are unpromoted until the first message is sent.
:param verified: if true only verified contacts can be added.
:returns: a :class:`Chat` object.
:returns: a :class:`deltachat.chatting.Chat` object.
"""
bytes_name = name.encode("utf8")
chat_id = lib.dc_create_group_chat(self._dc_context, verified, bytes_name)
@ -178,7 +178,7 @@ class Account(object):
def get_chats(self):
""" return list of chats.
:returns: a list of :class:`Chat` objects.
:returns: a list of :class:`deltachat.chatting.Chat` objects.
"""
dc_chatlist = ffi.gc(
lib.dc_get_chatlist(self._dc_context, 0, ffi.NULL, 0),
@ -214,8 +214,8 @@ class Account(object):
def forward_messages(self, messages, chat):
""" Forward list of messages to a chat.
:param messages: list of :class:`Message` object.
:param chat: :class:`Chat` object.
:param messages: list of :class:`deltachat.chatting.Message` object.
:param chat: :class:`deltachat.chatting.Chat` object.
:returns: None
"""
msg_ids = [msg.id for msg in messages]
@ -224,7 +224,7 @@ class Account(object):
def delete_messages(self, messages):
""" delete messages (local and remote).
:param messages: list of :class:`Message` object.
:param messages: list of :class:`deltachat.chatting.Message` object.
:returns: None
"""
msg_ids = [msg.id for msg in messages]

View file

@ -100,7 +100,7 @@ class Chat(object):
""" send a text message and return the resulting Message instance.
:param msg: unicode text
:returns: the resulting :class:`Message` instance
:returns: the resulting :class:`deltachat.chatting.Message` instance
"""
msg = as_dc_charpointer(msg)
msg_id = lib.dc_send_text_msg(self._dc_context, self.id, msg)
@ -109,7 +109,7 @@ class Chat(object):
def get_messages(self):
""" return list of messages in this chat.
:returns: list of :class:`Message` objects for this chat.
:returns: list of :class:`deltachat.chatting.Message` objects for this chat.
"""
dc_array = ffi.gc(
lib.dc_get_chat_msgs(self._dc_context, self.id, 0, 0),
@ -165,7 +165,7 @@ class Message(object):
""" Message object.
You obtain instances of it through :class:`deltachat.account.Account` or
:class:`Chat`.
:class:`deltachat.chatting.Chat`.
"""
_dc_context = attr.ib(validator=v.instance_of(ffi.CData))
id = attr.ib(validator=v.instance_of(int))
@ -180,7 +180,7 @@ class Message(object):
def get_state(self):
""" get the message in/out state.
:returns: :class:`MessageState`
:returns: :class:`deltachat.chatting.MessageState`
"""
return MessageState(self)
@ -202,7 +202,7 @@ class Message(object):
def chat(self):
"""chat this message was posted in.
:returns: :class:`Chat` object
:returns: :class:`deltachat.chatting.Chat` object
"""
chat_id = lib.dc_msg_get_chat_id(self._dc_msg)
return Chat(self._dc_context, chat_id)
@ -210,7 +210,7 @@ class Message(object):
def get_sender_contact(self):
"""return the contact of who wrote the message.
:returns: :class:`Contact`` instance
:returns: :class:`deltachat.chatting.Contact`` instance
"""
contact_id = lib.dc_msg_get_from_id(self._dc_msg)
return Contact(self._dc_context, contact_id)