Minor documentation and type hint updates

This commit is contained in:
Lonami Exo 2019-07-17 12:37:16 +02:00
parent 4bf85d9e8e
commit cbcbda5276
5 changed files with 6 additions and 6 deletions

View File

@ -16,7 +16,7 @@ class BotMethods:
offset: str = None,
geo_point: 'types.GeoPoint' = None) -> custom.InlineResults:
"""
Makes an inline query to the specified bot (e.g. ``@vote New Poll``).
Makes an inline query to the specified bot (``@vote New Poll``).
Arguments
bot (`entity`):

View File

@ -968,11 +968,11 @@ class ChatMethods:
from datetime import timedelta
# Kicking `user` from `chat` for 1 minute
client.edit_permission(chat, user, timedelta(minutes=1),
client.edit_permissions(chat, user, timedelta(minutes=1),
view_messages=False)
# Banning `user` from `chat` forever
client.edit_permission(chat, user, view_messages=False)
client.edit_permissions(chat, user, view_messages=False)
"""
entity = await self.get_input_entity(entity)
if not isinstance(entity, types.InputPeerChannel):

View File

@ -273,7 +273,7 @@ class DownloadMethods:
message: 'hints.MessageLike',
file: 'hints.FileLike' = None,
*,
thumb: 'hints.FileLike' = None,
thumb: 'typing.Union[int, types.TypePhotoSize]' = None,
progress_callback: 'hints.ProgressCallback' = None) -> typing.Optional[typing.Union[str, bytes]]:
"""
Downloads the given media from a message object.

View File

@ -521,7 +521,7 @@ class MessageMethods:
reply_to: 'typing.Union[int, types.Message]' = None,
parse_mode: typing.Optional[str] = (),
link_preview: bool = True,
file: 'hints.FileLike' = None,
file: 'typing.Union[hints.FileLike, typing.Sequence[hints.FileLike]]' = None,
force_document: bool = False,
clear_draft: bool = False,
buttons: 'hints.MarkupLike' = None,

View File

@ -166,7 +166,7 @@ class UserMethods:
async def is_user_authorized(self: 'TelegramClient') -> bool:
"""
Returns `True` if the user is authorized (i.e. has logged in).
Returns `True` if the user is authorized (logged in).
Example
.. code-block:: python