mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2024-09-21 03:08:49 +03:00
Add some missing words in the docs
This commit is contained in:
parent
72dc8052b3
commit
da9505fa3c
|
@ -88,6 +88,7 @@ Downloads
|
||||||
download_media
|
download_media
|
||||||
download_profile_photo
|
download_profile_photo
|
||||||
download_file
|
download_file
|
||||||
|
iter_download
|
||||||
|
|
||||||
Dialogs
|
Dialogs
|
||||||
-------
|
-------
|
||||||
|
@ -130,6 +131,7 @@ Chats
|
||||||
|
|
||||||
iter_participants
|
iter_participants
|
||||||
get_participants
|
get_participants
|
||||||
|
kick_participant
|
||||||
iter_admin_log
|
iter_admin_log
|
||||||
get_admin_log
|
get_admin_log
|
||||||
iter_profile_photos
|
iter_profile_photos
|
||||||
|
|
|
@ -35,7 +35,8 @@ class ButtonMethods:
|
||||||
from telethon import Button
|
from telethon import Button
|
||||||
|
|
||||||
markup = client.build_reply_markup(Button.inline('hi'))
|
markup = client.build_reply_markup(Button.inline('hi'))
|
||||||
await client.send_message('click me', buttons=markup)
|
# later
|
||||||
|
await client.send_message(chat, 'click me', buttons=markup)
|
||||||
"""
|
"""
|
||||||
if buttons is None:
|
if buttons is None:
|
||||||
return None
|
return None
|
||||||
|
|
0
tests/readthedocs/__init__.py
Normal file
0
tests/readthedocs/__init__.py
Normal file
8
tests/readthedocs/conftest.py
Normal file
8
tests/readthedocs/conftest.py
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
import pathlib
|
||||||
|
|
||||||
|
import pytest
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.fixture
|
||||||
|
def docs_dir():
|
||||||
|
return pathlib.Path('readthedocs')
|
0
tests/readthedocs/quick_references/__init__.py
Normal file
0
tests/readthedocs/quick_references/__init__.py
Normal file
14
tests/readthedocs/quick_references/test_client_reference.py
Normal file
14
tests/readthedocs/quick_references/test_client_reference.py
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
import re
|
||||||
|
|
||||||
|
from telethon import TelegramClient
|
||||||
|
|
||||||
|
|
||||||
|
def test_all_methods_present(docs_dir):
|
||||||
|
with (docs_dir / 'quick-references/client-reference.rst').open(encoding='utf-8') as fd:
|
||||||
|
present_methods = set(map(str.lstrip, re.findall(r'^ {4}\w+$', fd.read(), re.MULTILINE)))
|
||||||
|
|
||||||
|
assert len(present_methods) > 0
|
||||||
|
for name in dir(TelegramClient):
|
||||||
|
attr = getattr(TelegramClient, name)
|
||||||
|
if callable(attr) and not name.startswith('_'):
|
||||||
|
assert name in present_methods
|
Loading…
Reference in New Issue
Block a user