mirror of
https://github.com/python-telegram-bot/python-telegram-bot.git
synced 2024-10-23 17:36:26 +02:00
Rename kwargs to _kwargs where possible (#2182)
This commit is contained in:
parent
9831458e22
commit
3b9187ed5a
79 changed files with 158 additions and 197 deletions
|
@ -36,7 +36,7 @@ TO = TypeVar('TO', bound='TelegramObject', covariant=True)
|
||||||
class TelegramObject:
|
class TelegramObject:
|
||||||
"""Base class for most telegram objects."""
|
"""Base class for most telegram objects."""
|
||||||
|
|
||||||
# def __init__(self, *args: Any, **kwargs: Any): # pylint: disable=W0613
|
# def __init__(self, *args: Any, **_kwargs: Any):
|
||||||
# pass
|
# pass
|
||||||
|
|
||||||
_id_attrs: Tuple[Any, ...] = ()
|
_id_attrs: Tuple[Any, ...] = ()
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
# pylint: disable=E0611,E0213,E1102,C0103,E1101,W0613,R0913,R0904
|
# pylint: disable=E0611,E0213,E1102,C0103,E1101,R0913,R0904
|
||||||
#
|
#
|
||||||
# A library that provides a Python interface to the Telegram Bot API
|
# A library that provides a Python interface to the Telegram Bot API
|
||||||
# Copyright (C) 2015-2020
|
# Copyright (C) 2015-2020
|
||||||
|
@ -114,10 +114,12 @@ def info(func: Callable[..., RT]) -> Callable[..., RT]:
|
||||||
return decorator
|
return decorator
|
||||||
|
|
||||||
|
|
||||||
def log(func: Callable[..., RT], *args: Any, **kwargs: Any) -> Callable[..., RT]:
|
def log(
|
||||||
|
func: Callable[..., RT], *args: Any, **kwargs: Any # pylint: disable=W0613
|
||||||
|
) -> Callable[..., RT]:
|
||||||
logger = logging.getLogger(func.__module__)
|
logger = logging.getLogger(func.__module__)
|
||||||
|
|
||||||
def decorator(self: 'Bot', *args: Any, **kwargs: Any) -> RT:
|
def decorator(self: 'Bot', *args: Any, **kwargs: Any) -> RT: # pylint: disable=W0613
|
||||||
logger.debug('Entering: %s', func.__name__)
|
logger.debug('Entering: %s', func.__name__)
|
||||||
result = func(*args, **kwargs)
|
result = func(*args, **kwargs)
|
||||||
logger.debug(result)
|
logger.debug(result)
|
||||||
|
@ -149,7 +151,7 @@ class Bot(TelegramObject):
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __new__(cls, *args: Any, **kwargs: Any) -> 'Bot':
|
def __new__(cls, *args: Any, **kwargs: Any) -> 'Bot': # pylint: disable=W0613
|
||||||
# Get default values from kwargs
|
# Get default values from kwargs
|
||||||
defaults = kwargs.get('defaults')
|
defaults = kwargs.get('defaults')
|
||||||
|
|
||||||
|
|
|
@ -40,7 +40,7 @@ class BotCommand(TelegramObject):
|
||||||
description (:obj:`str`): Description of the command, 3-256 characters.
|
description (:obj:`str`): Description of the command, 3-256 characters.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(self, command: str, description: str, **kwargs: Any): # pylint: disable=W0613
|
def __init__(self, command: str, description: str, **_kwargs: Any):
|
||||||
self.command = command
|
self.command = command
|
||||||
self.description = description
|
self.description = description
|
||||||
|
|
||||||
|
|
|
@ -80,7 +80,7 @@ class CallbackQuery(TelegramObject):
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self, # pylint: disable=W0613
|
self,
|
||||||
id: str, # pylint: disable=W0622
|
id: str, # pylint: disable=W0622
|
||||||
from_user: User,
|
from_user: User,
|
||||||
chat_instance: str,
|
chat_instance: str,
|
||||||
|
@ -89,7 +89,7 @@ class CallbackQuery(TelegramObject):
|
||||||
inline_message_id: str = None,
|
inline_message_id: str = None,
|
||||||
game_short_name: str = None,
|
game_short_name: str = None,
|
||||||
bot: 'Bot' = None,
|
bot: 'Bot' = None,
|
||||||
**kwargs: Any,
|
**_kwargs: Any,
|
||||||
):
|
):
|
||||||
# Required
|
# Required
|
||||||
self.id = id # pylint: disable=C0103
|
self.id = id # pylint: disable=C0103
|
||||||
|
|
|
@ -103,7 +103,7 @@ class Chat(TelegramObject):
|
||||||
""":const:`telegram.constants.CHAT_CHANNEL`"""
|
""":const:`telegram.constants.CHAT_CHANNEL`"""
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self, # pylint: disable=W0613
|
self,
|
||||||
id: int,
|
id: int,
|
||||||
type: str,
|
type: str,
|
||||||
title: str = None,
|
title: str = None,
|
||||||
|
@ -119,7 +119,7 @@ class Chat(TelegramObject):
|
||||||
sticker_set_name: str = None,
|
sticker_set_name: str = None,
|
||||||
can_set_sticker_set: bool = None,
|
can_set_sticker_set: bool = None,
|
||||||
slow_mode_delay: int = None,
|
slow_mode_delay: int = None,
|
||||||
**kwargs: Any,
|
**_kwargs: Any,
|
||||||
):
|
):
|
||||||
# Required
|
# Required
|
||||||
self.id = int(id)
|
self.id = int(id)
|
||||||
|
@ -130,7 +130,7 @@ class Chat(TelegramObject):
|
||||||
self.first_name = first_name
|
self.first_name = first_name
|
||||||
self.last_name = last_name
|
self.last_name = last_name
|
||||||
# TODO: Remove (also from tests), when Telegram drops this completely
|
# TODO: Remove (also from tests), when Telegram drops this completely
|
||||||
self.all_members_are_administrators = kwargs.get('all_members_are_administrators')
|
self.all_members_are_administrators = _kwargs.get('all_members_are_administrators')
|
||||||
self.photo = photo
|
self.photo = photo
|
||||||
self.description = description
|
self.description = description
|
||||||
self.invite_link = invite_link
|
self.invite_link = invite_link
|
||||||
|
|
|
@ -125,7 +125,7 @@ class ChatMember(TelegramObject):
|
||||||
""":const:`telegram.constants.CHATMEMBER_RESTRICTED`"""
|
""":const:`telegram.constants.CHATMEMBER_RESTRICTED`"""
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self, # pylint: disable=W0613
|
self,
|
||||||
user: User,
|
user: User,
|
||||||
status: str,
|
status: str,
|
||||||
until_date: datetime.datetime = None,
|
until_date: datetime.datetime = None,
|
||||||
|
@ -145,7 +145,7 @@ class ChatMember(TelegramObject):
|
||||||
can_add_web_page_previews: bool = None,
|
can_add_web_page_previews: bool = None,
|
||||||
is_member: bool = None,
|
is_member: bool = None,
|
||||||
custom_title: str = None,
|
custom_title: str = None,
|
||||||
**kwargs: Any,
|
**_kwargs: Any,
|
||||||
):
|
):
|
||||||
# Required
|
# Required
|
||||||
self.user = user
|
self.user = user
|
||||||
|
|
|
@ -79,7 +79,7 @@ class ChatPermissions(TelegramObject):
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self, # pylint: disable=W0613
|
self,
|
||||||
can_send_messages: bool = None,
|
can_send_messages: bool = None,
|
||||||
can_send_media_messages: bool = None,
|
can_send_media_messages: bool = None,
|
||||||
can_send_polls: bool = None,
|
can_send_polls: bool = None,
|
||||||
|
@ -88,7 +88,7 @@ class ChatPermissions(TelegramObject):
|
||||||
can_change_info: bool = None,
|
can_change_info: bool = None,
|
||||||
can_invite_users: bool = None,
|
can_invite_users: bool = None,
|
||||||
can_pin_messages: bool = None,
|
can_pin_messages: bool = None,
|
||||||
**kwargs: Any,
|
**_kwargs: Any,
|
||||||
):
|
):
|
||||||
# Required
|
# Required
|
||||||
self.can_send_messages = can_send_messages
|
self.can_send_messages = can_send_messages
|
||||||
|
|
|
@ -64,13 +64,13 @@ class ChosenInlineResult(TelegramObject):
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self, # pylint: disable=W0613
|
self,
|
||||||
result_id: str,
|
result_id: str,
|
||||||
from_user: User,
|
from_user: User,
|
||||||
query: str,
|
query: str,
|
||||||
location: Location = None,
|
location: Location = None,
|
||||||
inline_message_id: str = None,
|
inline_message_id: str = None,
|
||||||
**kwargs: Any,
|
**_kwargs: Any,
|
||||||
):
|
):
|
||||||
# Required
|
# Required
|
||||||
self.result_id = result_id
|
self.result_id = result_id
|
||||||
|
|
|
@ -50,7 +50,7 @@ class Dice(TelegramObject):
|
||||||
emoji (:obj:`str`): Emoji on which the dice throw animation is based.
|
emoji (:obj:`str`): Emoji on which the dice throw animation is based.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(self, value: int, emoji: str, **kwargs: Any): # pylint: disable=W0613
|
def __init__(self, value: int, emoji: str, **_kwargs: Any):
|
||||||
self.value = value
|
self.value = value
|
||||||
self.emoji = emoji
|
self.emoji = emoji
|
||||||
|
|
||||||
|
|
|
@ -322,7 +322,7 @@ class Dispatcher:
|
||||||
*args: Any,
|
*args: Any,
|
||||||
update: HandlerArg = None,
|
update: HandlerArg = None,
|
||||||
error_handling: bool = True,
|
error_handling: bool = True,
|
||||||
**kwargs: Any, # pylint: disable=W0613
|
**kwargs: Any,
|
||||||
) -> Promise:
|
) -> Promise:
|
||||||
# TODO: Remove error_handling parameter once we drop the @run_async decorator
|
# TODO: Remove error_handling parameter once we drop the @run_async decorator
|
||||||
promise = Promise(func, args, kwargs, update=update, error_handling=error_handling)
|
promise = Promise(func, args, kwargs, update=update, error_handling=error_handling)
|
||||||
|
|
|
@ -65,7 +65,7 @@ class Animation(TelegramObject):
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self, # pylint: disable=W0613
|
self,
|
||||||
file_id: str,
|
file_id: str,
|
||||||
file_unique_id: str,
|
file_unique_id: str,
|
||||||
width: int,
|
width: int,
|
||||||
|
@ -76,7 +76,7 @@ class Animation(TelegramObject):
|
||||||
mime_type: str = None,
|
mime_type: str = None,
|
||||||
file_size: int = None,
|
file_size: int = None,
|
||||||
bot: 'Bot' = None,
|
bot: 'Bot' = None,
|
||||||
**kwargs: Any,
|
**_kwargs: Any,
|
||||||
):
|
):
|
||||||
# Required
|
# Required
|
||||||
self.file_id = str(file_id)
|
self.file_id = str(file_id)
|
||||||
|
|
|
@ -67,7 +67,7 @@ class Audio(TelegramObject):
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self, # pylint: disable=W0613
|
self,
|
||||||
file_id: str,
|
file_id: str,
|
||||||
file_unique_id: str,
|
file_unique_id: str,
|
||||||
duration: int,
|
duration: int,
|
||||||
|
@ -77,7 +77,7 @@ class Audio(TelegramObject):
|
||||||
file_size: int = None,
|
file_size: int = None,
|
||||||
thumb: PhotoSize = None,
|
thumb: PhotoSize = None,
|
||||||
bot: 'Bot' = None,
|
bot: 'Bot' = None,
|
||||||
**kwargs: Any,
|
**_kwargs: Any,
|
||||||
):
|
):
|
||||||
# Required
|
# Required
|
||||||
self.file_id = str(file_id)
|
self.file_id = str(file_id)
|
||||||
|
|
|
@ -63,13 +63,13 @@ class ChatPhoto(TelegramObject):
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self, # pylint: disable=W0613
|
self,
|
||||||
small_file_id: str,
|
small_file_id: str,
|
||||||
small_file_unique_id: str,
|
small_file_unique_id: str,
|
||||||
big_file_id: str,
|
big_file_id: str,
|
||||||
big_file_unique_id: str,
|
big_file_unique_id: str,
|
||||||
bot: 'Bot' = None,
|
bot: 'Bot' = None,
|
||||||
**kwargs: Any,
|
**_kwargs: Any,
|
||||||
):
|
):
|
||||||
self.small_file_id = small_file_id
|
self.small_file_id = small_file_id
|
||||||
self.small_file_unique_id = small_file_unique_id
|
self.small_file_unique_id = small_file_unique_id
|
||||||
|
|
|
@ -47,13 +47,13 @@ class Contact(TelegramObject):
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self, # pylint: disable=W0613
|
self,
|
||||||
phone_number: str,
|
phone_number: str,
|
||||||
first_name: str,
|
first_name: str,
|
||||||
last_name: str = None,
|
last_name: str = None,
|
||||||
user_id: int = None,
|
user_id: int = None,
|
||||||
vcard: str = None,
|
vcard: str = None,
|
||||||
**kwargs: Any,
|
**_kwargs: Any,
|
||||||
):
|
):
|
||||||
# Required
|
# Required
|
||||||
self.phone_number = str(phone_number)
|
self.phone_number = str(phone_number)
|
||||||
|
|
|
@ -62,7 +62,7 @@ class Document(TelegramObject):
|
||||||
_id_keys = ('file_id',)
|
_id_keys = ('file_id',)
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self, # pylint: disable=W0613
|
self,
|
||||||
file_id: str,
|
file_id: str,
|
||||||
file_unique_id: str,
|
file_unique_id: str,
|
||||||
thumb: PhotoSize = None,
|
thumb: PhotoSize = None,
|
||||||
|
@ -70,7 +70,7 @@ class Document(TelegramObject):
|
||||||
mime_type: str = None,
|
mime_type: str = None,
|
||||||
file_size: int = None,
|
file_size: int = None,
|
||||||
bot: 'Bot' = None,
|
bot: 'Bot' = None,
|
||||||
**kwargs: Any,
|
**_kwargs: Any,
|
||||||
):
|
):
|
||||||
# Required
|
# Required
|
||||||
self.file_id = str(file_id)
|
self.file_id = str(file_id)
|
||||||
|
|
|
@ -68,13 +68,13 @@ class File(TelegramObject):
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self, # pylint: disable=W0613
|
self,
|
||||||
file_id: str,
|
file_id: str,
|
||||||
file_unique_id: str,
|
file_unique_id: str,
|
||||||
bot: 'Bot' = None,
|
bot: 'Bot' = None,
|
||||||
file_size: int = None,
|
file_size: int = None,
|
||||||
file_path: str = None,
|
file_path: str = None,
|
||||||
**kwargs: Any,
|
**_kwargs: Any,
|
||||||
):
|
):
|
||||||
# Required
|
# Required
|
||||||
self.file_id = str(file_id)
|
self.file_id = str(file_id)
|
||||||
|
|
|
@ -40,7 +40,7 @@ class Location(TelegramObject):
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(self, longitude: float, latitude: float, **kwargs: Any): # pylint: disable=W0613
|
def __init__(self, longitude: float, latitude: float, **_kwargs: Any):
|
||||||
# Required
|
# Required
|
||||||
self.longitude = float(longitude)
|
self.longitude = float(longitude)
|
||||||
self.latitude = float(latitude)
|
self.latitude = float(latitude)
|
||||||
|
|
|
@ -58,14 +58,14 @@ class PhotoSize(TelegramObject):
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self, # pylint: disable=W0613
|
self,
|
||||||
file_id: str,
|
file_id: str,
|
||||||
file_unique_id: str,
|
file_unique_id: str,
|
||||||
width: int,
|
width: int,
|
||||||
height: int,
|
height: int,
|
||||||
file_size: int = None,
|
file_size: int = None,
|
||||||
bot: 'Bot' = None,
|
bot: 'Bot' = None,
|
||||||
**kwargs: Any,
|
**_kwargs: Any,
|
||||||
):
|
):
|
||||||
# Required
|
# Required
|
||||||
self.file_id = str(file_id)
|
self.file_id = str(file_id)
|
||||||
|
|
|
@ -74,7 +74,7 @@ class Sticker(TelegramObject):
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self, # pylint: disable=W0613
|
self,
|
||||||
file_id: str,
|
file_id: str,
|
||||||
file_unique_id: str,
|
file_unique_id: str,
|
||||||
width: int,
|
width: int,
|
||||||
|
@ -86,7 +86,7 @@ class Sticker(TelegramObject):
|
||||||
set_name: str = None,
|
set_name: str = None,
|
||||||
mask_position: 'MaskPosition' = None,
|
mask_position: 'MaskPosition' = None,
|
||||||
bot: 'Bot' = None,
|
bot: 'Bot' = None,
|
||||||
**kwargs: Any,
|
**_kwargs: Any,
|
||||||
):
|
):
|
||||||
# Required
|
# Required
|
||||||
self.file_id = str(file_id)
|
self.file_id = str(file_id)
|
||||||
|
@ -163,15 +163,14 @@ class StickerSet(TelegramObject):
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self, # pylint: disable=W0613
|
self,
|
||||||
name: str,
|
name: str,
|
||||||
title: str,
|
title: str,
|
||||||
is_animated: bool,
|
is_animated: bool,
|
||||||
contains_masks: bool,
|
contains_masks: bool,
|
||||||
stickers: List[Sticker],
|
stickers: List[Sticker],
|
||||||
bot: 'Bot' = None, # pylint: disable=W0613
|
|
||||||
thumb: PhotoSize = None,
|
thumb: PhotoSize = None,
|
||||||
**kwargs: Any,
|
**_kwargs: Any,
|
||||||
):
|
):
|
||||||
self.name = name
|
self.name = name
|
||||||
self.title = title
|
self.title = title
|
||||||
|
@ -243,9 +242,7 @@ class MaskPosition(TelegramObject):
|
||||||
CHIN: ClassVar[str] = constants.STICKER_CHIN
|
CHIN: ClassVar[str] = constants.STICKER_CHIN
|
||||||
""":const:`telegram.constants.STICKER_CHIN`"""
|
""":const:`telegram.constants.STICKER_CHIN`"""
|
||||||
|
|
||||||
def __init__(
|
def __init__(self, point: str, x_shift: float, y_shift: float, scale: float, **_kwargs: Any):
|
||||||
self, point: str, x_shift: float, y_shift: float, scale: float, **kwargs: Any
|
|
||||||
): # pylint: disable=W0613
|
|
||||||
self.point = point
|
self.point = point
|
||||||
self.x_shift = x_shift
|
self.x_shift = x_shift
|
||||||
self.y_shift = y_shift
|
self.y_shift = y_shift
|
||||||
|
|
|
@ -53,13 +53,13 @@ class Venue(TelegramObject):
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self, # pylint: disable=W0613
|
self,
|
||||||
location: Location,
|
location: Location,
|
||||||
title: str,
|
title: str,
|
||||||
address: str,
|
address: str,
|
||||||
foursquare_id: str = None,
|
foursquare_id: str = None,
|
||||||
foursquare_type: str = None,
|
foursquare_type: str = None,
|
||||||
**kwargs: Any,
|
**_kwargs: Any,
|
||||||
):
|
):
|
||||||
# Required
|
# Required
|
||||||
self.location = location
|
self.location = location
|
||||||
|
|
|
@ -64,7 +64,7 @@ class Video(TelegramObject):
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self, # pylint: disable=W0613
|
self,
|
||||||
file_id: str,
|
file_id: str,
|
||||||
file_unique_id: str,
|
file_unique_id: str,
|
||||||
width: int,
|
width: int,
|
||||||
|
@ -74,7 +74,7 @@ class Video(TelegramObject):
|
||||||
mime_type: str = None,
|
mime_type: str = None,
|
||||||
file_size: int = None,
|
file_size: int = None,
|
||||||
bot: 'Bot' = None,
|
bot: 'Bot' = None,
|
||||||
**kwargs: Any,
|
**_kwargs: Any,
|
||||||
):
|
):
|
||||||
# Required
|
# Required
|
||||||
self.file_id = str(file_id)
|
self.file_id = str(file_id)
|
||||||
|
|
|
@ -61,7 +61,7 @@ class VideoNote(TelegramObject):
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self, # pylint: disable=W0613
|
self,
|
||||||
file_id: str,
|
file_id: str,
|
||||||
file_unique_id: str,
|
file_unique_id: str,
|
||||||
length: int,
|
length: int,
|
||||||
|
@ -69,7 +69,7 @@ class VideoNote(TelegramObject):
|
||||||
thumb: PhotoSize = None,
|
thumb: PhotoSize = None,
|
||||||
file_size: int = None,
|
file_size: int = None,
|
||||||
bot: 'Bot' = None,
|
bot: 'Bot' = None,
|
||||||
**kwargs: Any,
|
**_kwargs: Any,
|
||||||
):
|
):
|
||||||
# Required
|
# Required
|
||||||
self.file_id = str(file_id)
|
self.file_id = str(file_id)
|
||||||
|
|
|
@ -58,14 +58,14 @@ class Voice(TelegramObject):
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self, # pylint: disable=W0613
|
self,
|
||||||
file_id: str,
|
file_id: str,
|
||||||
file_unique_id: str,
|
file_unique_id: str,
|
||||||
duration: int,
|
duration: int,
|
||||||
mime_type: str = None,
|
mime_type: str = None,
|
||||||
file_size: int = None,
|
file_size: int = None,
|
||||||
bot: 'Bot' = None,
|
bot: 'Bot' = None,
|
||||||
**kwargs: Any,
|
**_kwargs: Any,
|
||||||
):
|
):
|
||||||
# Required
|
# Required
|
||||||
self.file_id = str(file_id)
|
self.file_id = str(file_id)
|
||||||
|
|
|
@ -50,9 +50,7 @@ class ForceReply(ReplyMarkup):
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(
|
def __init__(self, force_reply: bool = True, selective: bool = False, **_kwargs: Any):
|
||||||
self, force_reply: bool = True, selective: bool = False, **kwargs: Any
|
|
||||||
): # pylint: disable=W0613
|
|
||||||
# Required
|
# Required
|
||||||
self.force_reply = bool(force_reply)
|
self.force_reply = bool(force_reply)
|
||||||
# Optionals
|
# Optionals
|
||||||
|
|
|
@ -68,14 +68,14 @@ class Game(TelegramObject):
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self, # pylint: disable=W0613
|
self,
|
||||||
title: str,
|
title: str,
|
||||||
description: str,
|
description: str,
|
||||||
photo: List[PhotoSize],
|
photo: List[PhotoSize],
|
||||||
text: str = None,
|
text: str = None,
|
||||||
text_entities: List[MessageEntity] = None,
|
text_entities: List[MessageEntity] = None,
|
||||||
animation: Animation = None,
|
animation: Animation = None,
|
||||||
**kwargs: Any,
|
**_kwargs: Any,
|
||||||
):
|
):
|
||||||
# Required
|
# Required
|
||||||
self.title = title
|
self.title = title
|
||||||
|
|
|
@ -84,7 +84,7 @@ class InlineKeyboardButton(TelegramObject):
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self, # pylint: disable=W0613
|
self,
|
||||||
text: str,
|
text: str,
|
||||||
url: str = None,
|
url: str = None,
|
||||||
callback_data: str = None,
|
callback_data: str = None,
|
||||||
|
@ -93,7 +93,7 @@ class InlineKeyboardButton(TelegramObject):
|
||||||
callback_game: 'CallbackGame' = None,
|
callback_game: 'CallbackGame' = None,
|
||||||
pay: bool = None,
|
pay: bool = None,
|
||||||
login_url: 'LoginUrl' = None,
|
login_url: 'LoginUrl' = None,
|
||||||
**kwargs: Any,
|
**_kwargs: Any,
|
||||||
):
|
):
|
||||||
# Required
|
# Required
|
||||||
self.text = text
|
self.text = text
|
||||||
|
|
|
@ -45,9 +45,7 @@ class InlineKeyboardMarkup(ReplyMarkup):
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(
|
def __init__(self, inline_keyboard: List[List[InlineKeyboardButton]], **_kwargs: Any):
|
||||||
self, inline_keyboard: List[List[InlineKeyboardButton]], **kwargs: Any
|
|
||||||
): # pylint: disable=W0613
|
|
||||||
# Required
|
# Required
|
||||||
self.inline_keyboard = inline_keyboard
|
self.inline_keyboard = inline_keyboard
|
||||||
|
|
||||||
|
|
|
@ -60,14 +60,14 @@ class InlineQuery(TelegramObject):
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self, # pylint: disable=W0613
|
self,
|
||||||
id: str, # pylint: disable=W0622
|
id: str, # pylint: disable=W0622
|
||||||
from_user: User,
|
from_user: User,
|
||||||
query: str,
|
query: str,
|
||||||
offset: str,
|
offset: str,
|
||||||
location: Location = None,
|
location: Location = None,
|
||||||
bot: 'Bot' = None,
|
bot: 'Bot' = None,
|
||||||
**kwargs: Any,
|
**_kwargs: Any,
|
||||||
):
|
):
|
||||||
# Required
|
# Required
|
||||||
self.id = id # pylint: disable=C0103
|
self.id = id # pylint: disable=C0103
|
||||||
|
|
|
@ -41,7 +41,7 @@ class InlineQueryResult(TelegramObject):
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(self, type: str, id: str, **kwargs: Any): # pylint: disable=W0613
|
def __init__(self, type: str, id: str, **_kwargs: Any):
|
||||||
# Required
|
# Required
|
||||||
self.type = str(type)
|
self.type = str(type)
|
||||||
self.id = str(id) # pylint: disable=C0103
|
self.id = str(id) # pylint: disable=C0103
|
||||||
|
|
|
@ -75,7 +75,7 @@ class InlineQueryResultArticle(InlineQueryResult):
|
||||||
thumb_url: str = None,
|
thumb_url: str = None,
|
||||||
thumb_width: int = None,
|
thumb_width: int = None,
|
||||||
thumb_height: int = None,
|
thumb_height: int = None,
|
||||||
**kwargs: Any, # pylint: disable=W0613
|
**_kwargs: Any,
|
||||||
):
|
):
|
||||||
|
|
||||||
# Required
|
# Required
|
||||||
|
|
|
@ -78,7 +78,7 @@ class InlineQueryResultAudio(InlineQueryResult):
|
||||||
reply_markup: 'ReplyMarkup' = None,
|
reply_markup: 'ReplyMarkup' = None,
|
||||||
input_message_content: 'InputMessageContent' = None,
|
input_message_content: 'InputMessageContent' = None,
|
||||||
parse_mode: Union[str, DefaultValue] = DEFAULT_NONE,
|
parse_mode: Union[str, DefaultValue] = DEFAULT_NONE,
|
||||||
**kwargs: Any, # pylint: disable=W0613
|
**_kwargs: Any,
|
||||||
):
|
):
|
||||||
|
|
||||||
# Required
|
# Required
|
||||||
|
|
|
@ -69,7 +69,7 @@ class InlineQueryResultCachedAudio(InlineQueryResult):
|
||||||
reply_markup: 'ReplyMarkup' = None,
|
reply_markup: 'ReplyMarkup' = None,
|
||||||
input_message_content: 'InputMessageContent' = None,
|
input_message_content: 'InputMessageContent' = None,
|
||||||
parse_mode: Union[str, DefaultValue] = DEFAULT_NONE,
|
parse_mode: Union[str, DefaultValue] = DEFAULT_NONE,
|
||||||
**kwargs: Any, # pylint: disable=W0613
|
**_kwargs: Any,
|
||||||
):
|
):
|
||||||
# Required
|
# Required
|
||||||
super().__init__('audio', id)
|
super().__init__('audio', id)
|
||||||
|
|
|
@ -78,7 +78,7 @@ class InlineQueryResultCachedDocument(InlineQueryResult):
|
||||||
reply_markup: 'ReplyMarkup' = None,
|
reply_markup: 'ReplyMarkup' = None,
|
||||||
input_message_content: 'InputMessageContent' = None,
|
input_message_content: 'InputMessageContent' = None,
|
||||||
parse_mode: Union[str, DefaultValue] = DEFAULT_NONE,
|
parse_mode: Union[str, DefaultValue] = DEFAULT_NONE,
|
||||||
**kwargs: Any, # pylint: disable=W0613
|
**_kwargs: Any,
|
||||||
):
|
):
|
||||||
# Required
|
# Required
|
||||||
super().__init__('document', id)
|
super().__init__('document', id)
|
||||||
|
|
|
@ -75,7 +75,7 @@ class InlineQueryResultCachedGif(InlineQueryResult):
|
||||||
reply_markup: 'ReplyMarkup' = None,
|
reply_markup: 'ReplyMarkup' = None,
|
||||||
input_message_content: 'InputMessageContent' = None,
|
input_message_content: 'InputMessageContent' = None,
|
||||||
parse_mode: Union[str, DefaultValue] = DEFAULT_NONE,
|
parse_mode: Union[str, DefaultValue] = DEFAULT_NONE,
|
||||||
**kwargs: Any, # pylint: disable=W0613
|
**_kwargs: Any,
|
||||||
):
|
):
|
||||||
# Required
|
# Required
|
||||||
super().__init__('gif', id)
|
super().__init__('gif', id)
|
||||||
|
|
|
@ -75,7 +75,7 @@ class InlineQueryResultCachedMpeg4Gif(InlineQueryResult):
|
||||||
reply_markup: 'ReplyMarkup' = None,
|
reply_markup: 'ReplyMarkup' = None,
|
||||||
input_message_content: 'InputMessageContent' = None,
|
input_message_content: 'InputMessageContent' = None,
|
||||||
parse_mode: Union[str, DefaultValue] = DEFAULT_NONE,
|
parse_mode: Union[str, DefaultValue] = DEFAULT_NONE,
|
||||||
**kwargs: Any, # pylint: disable=W0613
|
**_kwargs: Any,
|
||||||
):
|
):
|
||||||
# Required
|
# Required
|
||||||
super().__init__('mpeg4_gif', id)
|
super().__init__('mpeg4_gif', id)
|
||||||
|
|
|
@ -79,7 +79,7 @@ class InlineQueryResultCachedPhoto(InlineQueryResult):
|
||||||
reply_markup: 'ReplyMarkup' = None,
|
reply_markup: 'ReplyMarkup' = None,
|
||||||
input_message_content: 'InputMessageContent' = None,
|
input_message_content: 'InputMessageContent' = None,
|
||||||
parse_mode: Union[str, DefaultValue] = DEFAULT_NONE,
|
parse_mode: Union[str, DefaultValue] = DEFAULT_NONE,
|
||||||
**kwargs: Any, # pylint: disable=W0613
|
**_kwargs: Any,
|
||||||
):
|
):
|
||||||
# Required
|
# Required
|
||||||
super().__init__('photo', id)
|
super().__init__('photo', id)
|
||||||
|
|
|
@ -58,7 +58,7 @@ class InlineQueryResultCachedSticker(InlineQueryResult):
|
||||||
sticker_file_id: str,
|
sticker_file_id: str,
|
||||||
reply_markup: 'ReplyMarkup' = None,
|
reply_markup: 'ReplyMarkup' = None,
|
||||||
input_message_content: 'InputMessageContent' = None,
|
input_message_content: 'InputMessageContent' = None,
|
||||||
**kwargs: Any, # pylint: disable=W0613
|
**_kwargs: Any,
|
||||||
):
|
):
|
||||||
# Required
|
# Required
|
||||||
super().__init__('sticker', id)
|
super().__init__('sticker', id)
|
||||||
|
|
|
@ -78,7 +78,7 @@ class InlineQueryResultCachedVideo(InlineQueryResult):
|
||||||
reply_markup: 'ReplyMarkup' = None,
|
reply_markup: 'ReplyMarkup' = None,
|
||||||
input_message_content: 'InputMessageContent' = None,
|
input_message_content: 'InputMessageContent' = None,
|
||||||
parse_mode: Union[str, DefaultValue] = DEFAULT_NONE,
|
parse_mode: Union[str, DefaultValue] = DEFAULT_NONE,
|
||||||
**kwargs: Any, # pylint: disable=W0613
|
**_kwargs: Any,
|
||||||
):
|
):
|
||||||
# Required
|
# Required
|
||||||
super().__init__('video', id)
|
super().__init__('video', id)
|
||||||
|
|
|
@ -72,7 +72,7 @@ class InlineQueryResultCachedVoice(InlineQueryResult):
|
||||||
reply_markup: 'ReplyMarkup' = None,
|
reply_markup: 'ReplyMarkup' = None,
|
||||||
input_message_content: 'InputMessageContent' = None,
|
input_message_content: 'InputMessageContent' = None,
|
||||||
parse_mode: Union[str, DefaultValue] = DEFAULT_NONE,
|
parse_mode: Union[str, DefaultValue] = DEFAULT_NONE,
|
||||||
**kwargs: Any, # pylint: disable=W0613
|
**_kwargs: Any,
|
||||||
):
|
):
|
||||||
# Required
|
# Required
|
||||||
super().__init__('voice', id)
|
super().__init__('voice', id)
|
||||||
|
|
|
@ -78,7 +78,7 @@ class InlineQueryResultContact(InlineQueryResult):
|
||||||
thumb_width: int = None,
|
thumb_width: int = None,
|
||||||
thumb_height: int = None,
|
thumb_height: int = None,
|
||||||
vcard: str = None,
|
vcard: str = None,
|
||||||
**kwargs: Any, # pylint: disable=W0613
|
**_kwargs: Any,
|
||||||
):
|
):
|
||||||
# Required
|
# Required
|
||||||
super().__init__('contact', id)
|
super().__init__('contact', id)
|
||||||
|
|
|
@ -92,7 +92,7 @@ class InlineQueryResultDocument(InlineQueryResult):
|
||||||
thumb_width: int = None,
|
thumb_width: int = None,
|
||||||
thumb_height: int = None,
|
thumb_height: int = None,
|
||||||
parse_mode: Union[str, DefaultValue] = DEFAULT_NONE,
|
parse_mode: Union[str, DefaultValue] = DEFAULT_NONE,
|
||||||
**kwargs: Any, # pylint: disable=W0613
|
**_kwargs: Any,
|
||||||
):
|
):
|
||||||
# Required
|
# Required
|
||||||
super().__init__('document', id)
|
super().__init__('document', id)
|
||||||
|
|
|
@ -50,7 +50,7 @@ class InlineQueryResultGame(InlineQueryResult):
|
||||||
id: str, # pylint: disable=W0622
|
id: str, # pylint: disable=W0622
|
||||||
game_short_name: str,
|
game_short_name: str,
|
||||||
reply_markup: 'ReplyMarkup' = None,
|
reply_markup: 'ReplyMarkup' = None,
|
||||||
**kwargs: Any,
|
**_kwargs: Any,
|
||||||
):
|
):
|
||||||
# Required
|
# Required
|
||||||
super().__init__('game', id)
|
super().__init__('game', id)
|
||||||
|
|
|
@ -93,7 +93,7 @@ class InlineQueryResultGif(InlineQueryResult):
|
||||||
gif_duration: int = None,
|
gif_duration: int = None,
|
||||||
parse_mode: Union[str, DefaultValue] = DEFAULT_NONE,
|
parse_mode: Union[str, DefaultValue] = DEFAULT_NONE,
|
||||||
thumb_mime_type: str = None,
|
thumb_mime_type: str = None,
|
||||||
**kwargs: Any, # pylint: disable=W0613
|
**_kwargs: Any,
|
||||||
):
|
):
|
||||||
|
|
||||||
# Required
|
# Required
|
||||||
|
|
|
@ -78,7 +78,7 @@ class InlineQueryResultLocation(InlineQueryResult):
|
||||||
thumb_url: str = None,
|
thumb_url: str = None,
|
||||||
thumb_width: int = None,
|
thumb_width: int = None,
|
||||||
thumb_height: int = None,
|
thumb_height: int = None,
|
||||||
**kwargs: Any, # pylint: disable=W0613
|
**_kwargs: Any,
|
||||||
):
|
):
|
||||||
# Required
|
# Required
|
||||||
super().__init__('location', id)
|
super().__init__('location', id)
|
||||||
|
|
|
@ -92,7 +92,7 @@ class InlineQueryResultMpeg4Gif(InlineQueryResult):
|
||||||
mpeg4_duration: int = None,
|
mpeg4_duration: int = None,
|
||||||
parse_mode: Union[str, DefaultValue] = DEFAULT_NONE,
|
parse_mode: Union[str, DefaultValue] = DEFAULT_NONE,
|
||||||
thumb_mime_type: str = None,
|
thumb_mime_type: str = None,
|
||||||
**kwargs: Any, # pylint: disable=W0613
|
**_kwargs: Any,
|
||||||
):
|
):
|
||||||
|
|
||||||
# Required
|
# Required
|
||||||
|
|
|
@ -88,7 +88,7 @@ class InlineQueryResultPhoto(InlineQueryResult):
|
||||||
reply_markup: 'ReplyMarkup' = None,
|
reply_markup: 'ReplyMarkup' = None,
|
||||||
input_message_content: 'InputMessageContent' = None,
|
input_message_content: 'InputMessageContent' = None,
|
||||||
parse_mode: Union[str, DefaultValue] = DEFAULT_NONE,
|
parse_mode: Union[str, DefaultValue] = DEFAULT_NONE,
|
||||||
**kwargs: Any, # pylint: disable=W0613
|
**_kwargs: Any,
|
||||||
):
|
):
|
||||||
# Required
|
# Required
|
||||||
super().__init__('photo', id)
|
super().__init__('photo', id)
|
||||||
|
|
|
@ -86,7 +86,7 @@ class InlineQueryResultVenue(InlineQueryResult):
|
||||||
thumb_url: str = None,
|
thumb_url: str = None,
|
||||||
thumb_width: int = None,
|
thumb_width: int = None,
|
||||||
thumb_height: int = None,
|
thumb_height: int = None,
|
||||||
**kwargs: Any, # pylint: disable=W0613
|
**_kwargs: Any,
|
||||||
):
|
):
|
||||||
|
|
||||||
# Required
|
# Required
|
||||||
|
|
|
@ -100,7 +100,7 @@ class InlineQueryResultVideo(InlineQueryResult):
|
||||||
reply_markup: 'ReplyMarkup' = None,
|
reply_markup: 'ReplyMarkup' = None,
|
||||||
input_message_content: 'InputMessageContent' = None,
|
input_message_content: 'InputMessageContent' = None,
|
||||||
parse_mode: Union[str, DefaultValue] = DEFAULT_NONE,
|
parse_mode: Union[str, DefaultValue] = DEFAULT_NONE,
|
||||||
**kwargs: Any, # pylint: disable=W0613
|
**_kwargs: Any,
|
||||||
):
|
):
|
||||||
|
|
||||||
# Required
|
# Required
|
||||||
|
|
|
@ -76,7 +76,7 @@ class InlineQueryResultVoice(InlineQueryResult):
|
||||||
reply_markup: 'ReplyMarkup' = None,
|
reply_markup: 'ReplyMarkup' = None,
|
||||||
input_message_content: 'InputMessageContent' = None,
|
input_message_content: 'InputMessageContent' = None,
|
||||||
parse_mode: Union[str, DefaultValue] = DEFAULT_NONE,
|
parse_mode: Union[str, DefaultValue] = DEFAULT_NONE,
|
||||||
**kwargs: Any, # pylint: disable=W0613
|
**_kwargs: Any,
|
||||||
):
|
):
|
||||||
|
|
||||||
# Required
|
# Required
|
||||||
|
|
|
@ -47,12 +47,12 @@ class InputContactMessageContent(InputMessageContent):
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self, # pylint: disable=W0613
|
self,
|
||||||
phone_number: str,
|
phone_number: str,
|
||||||
first_name: str,
|
first_name: str,
|
||||||
last_name: str = None,
|
last_name: str = None,
|
||||||
vcard: str = None,
|
vcard: str = None,
|
||||||
**kwargs: Any,
|
**_kwargs: Any,
|
||||||
):
|
):
|
||||||
# Required
|
# Required
|
||||||
self.phone_number = phone_number
|
self.phone_number = phone_number
|
||||||
|
|
|
@ -47,9 +47,7 @@ class InputLocationMessageContent(InputMessageContent):
|
||||||
"""
|
"""
|
||||||
# fmt: on
|
# fmt: on
|
||||||
|
|
||||||
def __init__(
|
def __init__(self, latitude: float, longitude: float, live_period: int = None, **_kwargs: Any):
|
||||||
self, latitude: float, longitude: float, live_period: int = None, **kwargs: Any
|
|
||||||
): # pylint: disable=W0613
|
|
||||||
# Required
|
# Required
|
||||||
self.latitude = latitude
|
self.latitude = latitude
|
||||||
self.longitude = longitude
|
self.longitude = longitude
|
||||||
|
|
|
@ -53,11 +53,11 @@ class InputTextMessageContent(InputMessageContent):
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self, # pylint: disable=W0613
|
self,
|
||||||
message_text: str,
|
message_text: str,
|
||||||
parse_mode: Union[str, DefaultValue] = DEFAULT_NONE,
|
parse_mode: Union[str, DefaultValue] = DEFAULT_NONE,
|
||||||
disable_web_page_preview: Union[bool, DefaultValue] = DEFAULT_NONE,
|
disable_web_page_preview: Union[bool, DefaultValue] = DEFAULT_NONE,
|
||||||
**kwargs: Any,
|
**_kwargs: Any,
|
||||||
):
|
):
|
||||||
# Required
|
# Required
|
||||||
self.message_text = message_text
|
self.message_text = message_text
|
||||||
|
|
|
@ -54,14 +54,14 @@ class InputVenueMessageContent(InputMessageContent):
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self, # pylint: disable=W0613
|
self,
|
||||||
latitude: float,
|
latitude: float,
|
||||||
longitude: float,
|
longitude: float,
|
||||||
title: str,
|
title: str,
|
||||||
address: str,
|
address: str,
|
||||||
foursquare_id: str = None,
|
foursquare_id: str = None,
|
||||||
foursquare_type: str = None,
|
foursquare_type: str = None,
|
||||||
**kwargs: Any,
|
**_kwargs: Any,
|
||||||
):
|
):
|
||||||
# Required
|
# Required
|
||||||
self.latitude = latitude
|
self.latitude = latitude
|
||||||
|
|
|
@ -62,12 +62,12 @@ class KeyboardButton(TelegramObject):
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self, # pylint: disable=W0613
|
self,
|
||||||
text: str,
|
text: str,
|
||||||
request_contact: bool = None,
|
request_contact: bool = None,
|
||||||
request_location: bool = None,
|
request_location: bool = None,
|
||||||
request_poll: bool = None,
|
request_poll: bool = None,
|
||||||
**kwargs: Any,
|
**_kwargs: Any,
|
||||||
):
|
):
|
||||||
# Required
|
# Required
|
||||||
self.text = text
|
self.text = text
|
||||||
|
|
|
@ -37,7 +37,7 @@ class KeyboardButtonPollType(TelegramObject):
|
||||||
create a poll of any type.
|
create a poll of any type.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(self, type: str = None, **kwargs: Any): # pylint: disable=W0613, W0622
|
def __init__(self, type: str = None, **_kwargs: Any): # pylint: disable=W0622
|
||||||
self.type = type
|
self.type = type
|
||||||
|
|
||||||
self._id_attrs = (self.type,)
|
self._id_attrs = (self.type,)
|
||||||
|
|
|
@ -69,12 +69,12 @@ class LoginUrl(TelegramObject):
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self, # pylint: disable=W0613
|
self,
|
||||||
url: str,
|
url: str,
|
||||||
forward_text: bool = None,
|
forward_text: bool = None,
|
||||||
bot_username: str = None,
|
bot_username: str = None,
|
||||||
request_write_access: bool = None,
|
request_write_access: bool = None,
|
||||||
**kwargs: Any,
|
**_kwargs: Any,
|
||||||
):
|
):
|
||||||
# Required
|
# Required
|
||||||
self.url = url
|
self.url = url
|
||||||
|
|
|
@ -293,7 +293,7 @@ class Message(TelegramObject):
|
||||||
] + ATTACHMENT_TYPES
|
] + ATTACHMENT_TYPES
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self, # pylint: disable=W0613
|
self,
|
||||||
message_id: int,
|
message_id: int,
|
||||||
date: datetime.datetime,
|
date: datetime.datetime,
|
||||||
chat: Chat,
|
chat: Chat,
|
||||||
|
@ -344,7 +344,7 @@ class Message(TelegramObject):
|
||||||
bot: 'Bot' = None,
|
bot: 'Bot' = None,
|
||||||
dice: Dice = None,
|
dice: Dice = None,
|
||||||
via_bot: User = None,
|
via_bot: User = None,
|
||||||
**kwargs: Any,
|
**_kwargs: Any,
|
||||||
):
|
):
|
||||||
# Required
|
# Required
|
||||||
self.message_id = int(message_id)
|
self.message_id = int(message_id)
|
||||||
|
|
|
@ -60,14 +60,14 @@ class MessageEntity(TelegramObject):
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self, # pylint: disable=W0613
|
self,
|
||||||
type: str, # pylint: disable=W0622
|
type: str, # pylint: disable=W0622
|
||||||
offset: int,
|
offset: int,
|
||||||
length: int,
|
length: int,
|
||||||
url: str = None,
|
url: str = None,
|
||||||
user: User = None,
|
user: User = None,
|
||||||
language: str = None,
|
language: str = None,
|
||||||
**kwargs: Any,
|
**_kwargs: Any,
|
||||||
):
|
):
|
||||||
# Required
|
# Required
|
||||||
self.type = type
|
self.type = type
|
||||||
|
|
|
@ -131,9 +131,7 @@ class EncryptedCredentials(TelegramObject):
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(
|
def __init__(self, data: str, hash: str, secret: str, bot: 'Bot' = None, **_kwargs: Any):
|
||||||
self, data: str, hash: str, secret: str, bot: 'Bot' = None, **kwargs: Any
|
|
||||||
): # pylint: disable=W0613
|
|
||||||
# Required
|
# Required
|
||||||
self.data = data
|
self.data = data
|
||||||
self.hash = hash
|
self.hash = hash
|
||||||
|
@ -197,9 +195,7 @@ class Credentials(TelegramObject):
|
||||||
nonce (:obj:`str`): Bot-specified nonce
|
nonce (:obj:`str`): Bot-specified nonce
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(
|
def __init__(self, secure_data: 'SecureData', nonce: str, bot: 'Bot' = None, **_kwargs: Any):
|
||||||
self, secure_data: 'SecureData', nonce: str, bot: 'Bot' = None, **kwargs: Any
|
|
||||||
): # pylint: disable=W0613
|
|
||||||
# Required
|
# Required
|
||||||
self.secure_data = secure_data
|
self.secure_data = secure_data
|
||||||
self.nonce = nonce
|
self.nonce = nonce
|
||||||
|
@ -247,7 +243,7 @@ class SecureData(TelegramObject):
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self, # pylint: disable=W0613
|
self,
|
||||||
personal_details: 'SecureValue' = None,
|
personal_details: 'SecureValue' = None,
|
||||||
passport: 'SecureValue' = None,
|
passport: 'SecureValue' = None,
|
||||||
internal_passport: 'SecureValue' = None,
|
internal_passport: 'SecureValue' = None,
|
||||||
|
@ -260,7 +256,7 @@ class SecureData(TelegramObject):
|
||||||
passport_registration: 'SecureValue' = None,
|
passport_registration: 'SecureValue' = None,
|
||||||
temporary_registration: 'SecureValue' = None,
|
temporary_registration: 'SecureValue' = None,
|
||||||
bot: 'Bot' = None,
|
bot: 'Bot' = None,
|
||||||
**kwargs: Any,
|
**_kwargs: Any,
|
||||||
):
|
):
|
||||||
# Optionals
|
# Optionals
|
||||||
self.temporary_registration = temporary_registration
|
self.temporary_registration = temporary_registration
|
||||||
|
@ -331,7 +327,7 @@ class SecureValue(TelegramObject):
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self, # pylint: disable=W0613
|
self,
|
||||||
data: 'DataCredentials' = None,
|
data: 'DataCredentials' = None,
|
||||||
front_side: 'FileCredentials' = None,
|
front_side: 'FileCredentials' = None,
|
||||||
reverse_side: 'FileCredentials' = None,
|
reverse_side: 'FileCredentials' = None,
|
||||||
|
@ -339,7 +335,7 @@ class SecureValue(TelegramObject):
|
||||||
files: List['FileCredentials'] = None,
|
files: List['FileCredentials'] = None,
|
||||||
translation: List['FileCredentials'] = None,
|
translation: List['FileCredentials'] = None,
|
||||||
bot: 'Bot' = None,
|
bot: 'Bot' = None,
|
||||||
**kwargs: Any,
|
**_kwargs: Any,
|
||||||
):
|
):
|
||||||
self.data = data
|
self.data = data
|
||||||
self.front_side = front_side
|
self.front_side = front_side
|
||||||
|
@ -378,9 +374,7 @@ class SecureValue(TelegramObject):
|
||||||
class _CredentialsBase(TelegramObject):
|
class _CredentialsBase(TelegramObject):
|
||||||
"""Base class for DataCredentials and FileCredentials."""
|
"""Base class for DataCredentials and FileCredentials."""
|
||||||
|
|
||||||
def __init__(
|
def __init__(self, hash: str, secret: str, bot: 'Bot' = None, **_kwargs: Any):
|
||||||
self, hash: str, secret: str, bot: 'Bot' = None, **kwargs: Any
|
|
||||||
): # pylint: disable=W0613
|
|
||||||
self.hash = hash
|
self.hash = hash
|
||||||
self.secret = secret
|
self.secret = secret
|
||||||
|
|
||||||
|
@ -405,8 +399,8 @@ class DataCredentials(_CredentialsBase):
|
||||||
secret (:obj:`str`): Secret of encrypted data
|
secret (:obj:`str`): Secret of encrypted data
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(self, data_hash: str, secret: str, **kwargs: Any): # pylint: disable=W0613
|
def __init__(self, data_hash: str, secret: str, **_kwargs: Any):
|
||||||
super().__init__(data_hash, secret, **kwargs)
|
super().__init__(data_hash, secret, **_kwargs)
|
||||||
|
|
||||||
def to_dict(self) -> JSONDict:
|
def to_dict(self) -> JSONDict:
|
||||||
data = super().to_dict()
|
data = super().to_dict()
|
||||||
|
@ -431,8 +425,8 @@ class FileCredentials(_CredentialsBase):
|
||||||
secret (:obj:`str`): Secret of encrypted file
|
secret (:obj:`str`): Secret of encrypted file
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(self, file_hash: str, secret: str, **kwargs: Any): # pylint: disable=W0613
|
def __init__(self, file_hash: str, secret: str, **_kwargs: Any):
|
||||||
super().__init__(file_hash, secret, **kwargs)
|
super().__init__(file_hash, secret, **_kwargs)
|
||||||
|
|
||||||
def to_dict(self) -> JSONDict:
|
def to_dict(self) -> JSONDict:
|
||||||
data = super().to_dict()
|
data = super().to_dict()
|
||||||
|
|
|
@ -47,7 +47,7 @@ class PersonalDetails(TelegramObject):
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self, # pylint: disable=W0613
|
self,
|
||||||
first_name: str,
|
first_name: str,
|
||||||
last_name: str,
|
last_name: str,
|
||||||
birth_date: str,
|
birth_date: str,
|
||||||
|
@ -59,7 +59,7 @@ class PersonalDetails(TelegramObject):
|
||||||
middle_name: str = None,
|
middle_name: str = None,
|
||||||
middle_name_native: str = None,
|
middle_name_native: str = None,
|
||||||
bot: 'Bot' = None,
|
bot: 'Bot' = None,
|
||||||
**kwargs: Any,
|
**_kwargs: Any,
|
||||||
):
|
):
|
||||||
# Required
|
# Required
|
||||||
self.first_name = first_name
|
self.first_name = first_name
|
||||||
|
@ -90,7 +90,7 @@ class ResidentialAddress(TelegramObject):
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self, # pylint: disable=W0613
|
self,
|
||||||
street_line1: str,
|
street_line1: str,
|
||||||
street_line2: str,
|
street_line2: str,
|
||||||
city: str,
|
city: str,
|
||||||
|
@ -98,7 +98,7 @@ class ResidentialAddress(TelegramObject):
|
||||||
country_code: str,
|
country_code: str,
|
||||||
post_code: str,
|
post_code: str,
|
||||||
bot: 'Bot' = None,
|
bot: 'Bot' = None,
|
||||||
**kwargs: Any,
|
**_kwargs: Any,
|
||||||
):
|
):
|
||||||
# Required
|
# Required
|
||||||
self.street_line1 = street_line1
|
self.street_line1 = street_line1
|
||||||
|
@ -120,9 +120,7 @@ class IdDocumentData(TelegramObject):
|
||||||
expiry_date (:obj:`str`): Optional. Date of expiry, in DD.MM.YYYY format.
|
expiry_date (:obj:`str`): Optional. Date of expiry, in DD.MM.YYYY format.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(
|
def __init__(self, document_no: str, expiry_date: str, bot: 'Bot' = None, **_kwargs: Any):
|
||||||
self, document_no: str, expiry_date: str, bot: 'Bot' = None, **kwargs: Any
|
|
||||||
): # pylint: disable=W0613
|
|
||||||
self.document_no = document_no
|
self.document_no = document_no
|
||||||
self.expiry_date = expiry_date
|
self.expiry_date = expiry_date
|
||||||
|
|
||||||
|
|
|
@ -118,7 +118,7 @@ class EncryptedPassportElement(TelegramObject):
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self, # pylint: disable=W0613
|
self,
|
||||||
type: str, # pylint: disable=W0622
|
type: str, # pylint: disable=W0622
|
||||||
data: PersonalDetails = None,
|
data: PersonalDetails = None,
|
||||||
phone_number: str = None,
|
phone_number: str = None,
|
||||||
|
@ -131,7 +131,7 @@ class EncryptedPassportElement(TelegramObject):
|
||||||
hash: str = None, # pylint: disable=W0622
|
hash: str = None, # pylint: disable=W0622
|
||||||
bot: 'Bot' = None,
|
bot: 'Bot' = None,
|
||||||
credentials: 'Credentials' = None, # pylint: disable=W0613
|
credentials: 'Credentials' = None, # pylint: disable=W0613
|
||||||
**kwargs: Any,
|
**_kwargs: Any,
|
||||||
):
|
):
|
||||||
# Required
|
# Required
|
||||||
self.type = type
|
self.type = type
|
||||||
|
|
|
@ -52,11 +52,11 @@ class PassportData(TelegramObject):
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self, # pylint: disable=W0613
|
self,
|
||||||
data: List[EncryptedPassportElement],
|
data: List[EncryptedPassportElement],
|
||||||
credentials: EncryptedCredentials,
|
credentials: EncryptedCredentials,
|
||||||
bot: 'Bot' = None,
|
bot: 'Bot' = None,
|
||||||
**kwargs: Any,
|
**_kwargs: Any,
|
||||||
):
|
):
|
||||||
self.data = data
|
self.data = data
|
||||||
self.credentials = credentials
|
self.credentials = credentials
|
||||||
|
|
|
@ -42,9 +42,7 @@ class PassportElementError(TelegramObject):
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(
|
def __init__(self, source: str, type: str, message: str, **_kwargs: Any):
|
||||||
self, source: str, type: str, message: str, **kwargs: Any
|
|
||||||
): # pylint: disable=W0613
|
|
||||||
# Required
|
# Required
|
||||||
self.source = str(source)
|
self.source = str(source)
|
||||||
self.type = str(type)
|
self.type = str(type)
|
||||||
|
@ -81,9 +79,7 @@ class PassportElementErrorDataField(PassportElementError):
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(
|
def __init__(self, type: str, field_name: str, data_hash: str, message: str, **_kwargs: Any):
|
||||||
self, type: str, field_name: str, data_hash: str, message: str, **kwargs: Any
|
|
||||||
): # pylint: disable=W0613
|
|
||||||
# Required
|
# Required
|
||||||
super().__init__('data', type, message)
|
super().__init__('data', type, message)
|
||||||
self.field_name = field_name
|
self.field_name = field_name
|
||||||
|
@ -118,9 +114,7 @@ class PassportElementErrorFile(PassportElementError):
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(
|
def __init__(self, type: str, file_hash: str, message: str, **_kwargs: Any):
|
||||||
self, type: str, file_hash: str, message: str, **kwargs: Any
|
|
||||||
): # pylint: disable=W0613
|
|
||||||
# Required
|
# Required
|
||||||
super().__init__('file', type, message)
|
super().__init__('file', type, message)
|
||||||
self.file_hash = file_hash
|
self.file_hash = file_hash
|
||||||
|
@ -154,9 +148,7 @@ class PassportElementErrorFiles(PassportElementError):
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(
|
def __init__(self, type: str, file_hashes: str, message: str, **_kwargs: Any):
|
||||||
self, type: str, file_hashes: str, message: str, **kwargs: Any
|
|
||||||
): # pylint: disable=W0613
|
|
||||||
# Required
|
# Required
|
||||||
super().__init__('files', type, message)
|
super().__init__('files', type, message)
|
||||||
self.file_hashes = file_hashes
|
self.file_hashes = file_hashes
|
||||||
|
@ -190,9 +182,7 @@ class PassportElementErrorFrontSide(PassportElementError):
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(
|
def __init__(self, type: str, file_hash: str, message: str, **_kwargs: Any):
|
||||||
self, type: str, file_hash: str, message: str, **kwargs: Any
|
|
||||||
): # pylint: disable=W0613
|
|
||||||
# Required
|
# Required
|
||||||
super().__init__('front_side', type, message)
|
super().__init__('front_side', type, message)
|
||||||
self.file_hash = file_hash
|
self.file_hash = file_hash
|
||||||
|
@ -226,9 +216,7 @@ class PassportElementErrorReverseSide(PassportElementError):
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(
|
def __init__(self, type: str, file_hash: str, message: str, **_kwargs: Any):
|
||||||
self, type: str, file_hash: str, message: str, **kwargs: Any
|
|
||||||
): # pylint: disable=W0613
|
|
||||||
# Required
|
# Required
|
||||||
super().__init__('reverse_side', type, message)
|
super().__init__('reverse_side', type, message)
|
||||||
self.file_hash = file_hash
|
self.file_hash = file_hash
|
||||||
|
@ -260,9 +248,7 @@ class PassportElementErrorSelfie(PassportElementError):
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(
|
def __init__(self, type: str, file_hash: str, message: str, **_kwargs: Any):
|
||||||
self, type: str, file_hash: str, message: str, **kwargs: Any
|
|
||||||
): # pylint: disable=W0613
|
|
||||||
# Required
|
# Required
|
||||||
super().__init__('selfie', type, message)
|
super().__init__('selfie', type, message)
|
||||||
self.file_hash = file_hash
|
self.file_hash = file_hash
|
||||||
|
@ -298,9 +284,7 @@ class PassportElementErrorTranslationFile(PassportElementError):
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(
|
def __init__(self, type: str, file_hash: str, message: str, **_kwargs: Any):
|
||||||
self, type: str, file_hash: str, message: str, **kwargs: Any
|
|
||||||
): # pylint: disable=W0613
|
|
||||||
# Required
|
# Required
|
||||||
super().__init__('translation_file', type, message)
|
super().__init__('translation_file', type, message)
|
||||||
self.file_hash = file_hash
|
self.file_hash = file_hash
|
||||||
|
@ -336,9 +320,7 @@ class PassportElementErrorTranslationFiles(PassportElementError):
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(
|
def __init__(self, type: str, file_hashes: str, message: str, **_kwargs: Any):
|
||||||
self, type: str, file_hashes: str, message: str, **kwargs: Any
|
|
||||||
): # pylint: disable=W0613
|
|
||||||
# Required
|
# Required
|
||||||
super().__init__('translation_files', type, message)
|
super().__init__('translation_files', type, message)
|
||||||
self.file_hashes = file_hashes
|
self.file_hashes = file_hashes
|
||||||
|
@ -368,9 +350,7 @@ class PassportElementErrorUnspecified(PassportElementError):
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(
|
def __init__(self, type: str, element_hash: str, message: str, **_kwargs: Any):
|
||||||
self, type: str, element_hash: str, message: str, **kwargs: Any
|
|
||||||
): # pylint: disable=W0613
|
|
||||||
# Required
|
# Required
|
||||||
super().__init__('unspecified', type, message)
|
super().__init__('unspecified', type, message)
|
||||||
self.element_hash = element_hash
|
self.element_hash = element_hash
|
||||||
|
|
|
@ -58,14 +58,14 @@ class PassportFile(TelegramObject):
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self, # pylint: disable=W0613
|
self,
|
||||||
file_id: str,
|
file_id: str,
|
||||||
file_unique_id: str,
|
file_unique_id: str,
|
||||||
file_date: int,
|
file_date: int,
|
||||||
file_size: int = None,
|
file_size: int = None,
|
||||||
bot: 'Bot' = None,
|
bot: 'Bot' = None,
|
||||||
credentials: 'FileCredentials' = None,
|
credentials: 'FileCredentials' = None,
|
||||||
**kwargs: Any,
|
**_kwargs: Any,
|
||||||
):
|
):
|
||||||
# Required
|
# Required
|
||||||
self.file_id = file_id
|
self.file_id = file_id
|
||||||
|
|
|
@ -54,13 +54,13 @@ class Invoice(TelegramObject):
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self, # pylint: disable=W0613
|
self,
|
||||||
title: str,
|
title: str,
|
||||||
description: str,
|
description: str,
|
||||||
start_parameter: str,
|
start_parameter: str,
|
||||||
currency: str,
|
currency: str,
|
||||||
total_amount: int,
|
total_amount: int,
|
||||||
**kwargs: Any,
|
**_kwargs: Any,
|
||||||
):
|
):
|
||||||
self.title = title
|
self.title = title
|
||||||
self.description = description
|
self.description = description
|
||||||
|
|
|
@ -45,7 +45,7 @@ class LabeledPrice(TelegramObject):
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(self, label: str, amount: int, **kwargs: Any): # pylint: disable=W0613
|
def __init__(self, label: str, amount: int, **_kwargs: Any):
|
||||||
self.label = label
|
self.label = label
|
||||||
self.amount = amount
|
self.amount = amount
|
||||||
|
|
||||||
|
|
|
@ -50,12 +50,12 @@ class OrderInfo(TelegramObject):
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self, # pylint: disable=W0613
|
self,
|
||||||
name: str = None,
|
name: str = None,
|
||||||
phone_number: str = None,
|
phone_number: str = None,
|
||||||
email: str = None,
|
email: str = None,
|
||||||
shipping_address: str = None,
|
shipping_address: str = None,
|
||||||
**kwargs: Any,
|
**_kwargs: Any,
|
||||||
):
|
):
|
||||||
self.name = name
|
self.name = name
|
||||||
self.phone_number = phone_number
|
self.phone_number = phone_number
|
||||||
|
|
|
@ -67,7 +67,7 @@ class PreCheckoutQuery(TelegramObject):
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self, # pylint: disable=W0613
|
self,
|
||||||
id: str, # pylint: disable=W0622
|
id: str, # pylint: disable=W0622
|
||||||
from_user: User,
|
from_user: User,
|
||||||
currency: str,
|
currency: str,
|
||||||
|
@ -76,7 +76,7 @@ class PreCheckoutQuery(TelegramObject):
|
||||||
shipping_option_id: str = None,
|
shipping_option_id: str = None,
|
||||||
order_info: OrderInfo = None,
|
order_info: OrderInfo = None,
|
||||||
bot: 'Bot' = None,
|
bot: 'Bot' = None,
|
||||||
**kwargs: Any,
|
**_kwargs: Any,
|
||||||
):
|
):
|
||||||
self.id = id # pylint: disable=C0103
|
self.id = id # pylint: disable=C0103
|
||||||
self.from_user = from_user
|
self.from_user = from_user
|
||||||
|
|
|
@ -50,14 +50,14 @@ class ShippingAddress(TelegramObject):
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self, # pylint: disable=W0613
|
self,
|
||||||
country_code: str,
|
country_code: str,
|
||||||
state: str,
|
state: str,
|
||||||
city: str,
|
city: str,
|
||||||
street_line1: str,
|
street_line1: str,
|
||||||
street_line2: str,
|
street_line2: str,
|
||||||
post_code: str,
|
post_code: str,
|
||||||
**kwargs: Any,
|
**_kwargs: Any,
|
||||||
):
|
):
|
||||||
self.country_code = country_code
|
self.country_code = country_code
|
||||||
self.state = state
|
self.state = state
|
||||||
|
|
|
@ -47,11 +47,11 @@ class ShippingOption(TelegramObject):
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self, # pylint: disable=W0613
|
self,
|
||||||
id: str, # pylint: disable=W0622
|
id: str, # pylint: disable=W0622
|
||||||
title: str,
|
title: str,
|
||||||
prices: List['LabeledPrice'],
|
prices: List['LabeledPrice'],
|
||||||
**kwargs: Any,
|
**_kwargs: Any,
|
||||||
):
|
):
|
||||||
self.id = id # pylint: disable=C0103
|
self.id = id # pylint: disable=C0103
|
||||||
self.title = title
|
self.title = title
|
||||||
|
|
|
@ -54,13 +54,13 @@ class ShippingQuery(TelegramObject):
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self, # pylint: disable=W0613
|
self,
|
||||||
id: str, # pylint: disable=W0622
|
id: str, # pylint: disable=W0622
|
||||||
from_user: User,
|
from_user: User,
|
||||||
invoice_payload: str,
|
invoice_payload: str,
|
||||||
shipping_address: ShippingAddress,
|
shipping_address: ShippingAddress,
|
||||||
bot: 'Bot' = None,
|
bot: 'Bot' = None,
|
||||||
**kwargs: Any,
|
**_kwargs: Any,
|
||||||
):
|
):
|
||||||
self.id = id # pylint: disable=C0103
|
self.id = id # pylint: disable=C0103
|
||||||
self.from_user = from_user
|
self.from_user = from_user
|
||||||
|
|
|
@ -63,7 +63,7 @@ class SuccessfulPayment(TelegramObject):
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self, # pylint: disable=W0613
|
self,
|
||||||
currency: str,
|
currency: str,
|
||||||
total_amount: int,
|
total_amount: int,
|
||||||
invoice_payload: str,
|
invoice_payload: str,
|
||||||
|
@ -71,7 +71,7 @@ class SuccessfulPayment(TelegramObject):
|
||||||
provider_payment_charge_id: str,
|
provider_payment_charge_id: str,
|
||||||
shipping_option_id: str = None,
|
shipping_option_id: str = None,
|
||||||
order_info: OrderInfo = None,
|
order_info: OrderInfo = None,
|
||||||
**kwargs: Any,
|
**_kwargs: Any,
|
||||||
):
|
):
|
||||||
self.currency = currency
|
self.currency = currency
|
||||||
self.total_amount = total_amount
|
self.total_amount = total_amount
|
||||||
|
|
|
@ -48,7 +48,7 @@ class PollOption(TelegramObject):
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(self, text: str, voter_count: int, **kwargs: Any): # pylint: disable=W0613
|
def __init__(self, text: str, voter_count: int, **_kwargs: Any):
|
||||||
self.text = text
|
self.text = text
|
||||||
self.voter_count = voter_count
|
self.voter_count = voter_count
|
||||||
|
|
||||||
|
@ -75,9 +75,7 @@ class PollAnswer(TelegramObject):
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(
|
def __init__(self, poll_id: str, user: User, option_ids: List[int], **_kwargs: Any):
|
||||||
self, poll_id: str, user: User, option_ids: List[int], **kwargs: Any
|
|
||||||
): # pylint: disable=W0613
|
|
||||||
self.poll_id = poll_id
|
self.poll_id = poll_id
|
||||||
self.user = user
|
self.user = user
|
||||||
self.option_ids = option_ids
|
self.option_ids = option_ids
|
||||||
|
@ -145,7 +143,7 @@ class Poll(TelegramObject):
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self, # pylint: disable=W0613
|
self,
|
||||||
id: str, # pylint: disable=W0622
|
id: str, # pylint: disable=W0622
|
||||||
question: str,
|
question: str,
|
||||||
options: List[PollOption],
|
options: List[PollOption],
|
||||||
|
@ -159,7 +157,7 @@ class Poll(TelegramObject):
|
||||||
explanation_entities: List[MessageEntity] = None,
|
explanation_entities: List[MessageEntity] = None,
|
||||||
open_period: int = None,
|
open_period: int = None,
|
||||||
close_date: datetime.datetime = None,
|
close_date: datetime.datetime = None,
|
||||||
**kwargs: Any,
|
**_kwargs: Any,
|
||||||
):
|
):
|
||||||
self.id = id # pylint: disable=C0103
|
self.id = id # pylint: disable=C0103
|
||||||
self.question = question
|
self.question = question
|
||||||
|
|
|
@ -66,12 +66,12 @@ class ReplyKeyboardMarkup(ReplyMarkup):
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self, # pylint: disable=W0613
|
self,
|
||||||
keyboard: List[List[Union[str, KeyboardButton]]],
|
keyboard: List[List[Union[str, KeyboardButton]]],
|
||||||
resize_keyboard: bool = False,
|
resize_keyboard: bool = False,
|
||||||
one_time_keyboard: bool = False,
|
one_time_keyboard: bool = False,
|
||||||
selective: bool = False,
|
selective: bool = False,
|
||||||
**kwargs: Any,
|
**_kwargs: Any,
|
||||||
):
|
):
|
||||||
# Required
|
# Required
|
||||||
self.keyboard = []
|
self.keyboard = []
|
||||||
|
@ -110,7 +110,7 @@ class ReplyKeyboardMarkup(ReplyMarkup):
|
||||||
resize_keyboard: bool = False,
|
resize_keyboard: bool = False,
|
||||||
one_time_keyboard: bool = False,
|
one_time_keyboard: bool = False,
|
||||||
selective: bool = False,
|
selective: bool = False,
|
||||||
**kwargs: Any, # pylint: disable=W0613
|
**kwargs: Any,
|
||||||
) -> 'ReplyKeyboardMarkup':
|
) -> 'ReplyKeyboardMarkup':
|
||||||
"""Shortcut for::
|
"""Shortcut for::
|
||||||
|
|
||||||
|
@ -155,7 +155,7 @@ class ReplyKeyboardMarkup(ReplyMarkup):
|
||||||
resize_keyboard: bool = False,
|
resize_keyboard: bool = False,
|
||||||
one_time_keyboard: bool = False,
|
one_time_keyboard: bool = False,
|
||||||
selective: bool = False,
|
selective: bool = False,
|
||||||
**kwargs: Any, # pylint: disable=W0613
|
**kwargs: Any,
|
||||||
) -> 'ReplyKeyboardMarkup':
|
) -> 'ReplyKeyboardMarkup':
|
||||||
"""Shortcut for::
|
"""Shortcut for::
|
||||||
|
|
||||||
|
@ -201,7 +201,7 @@ class ReplyKeyboardMarkup(ReplyMarkup):
|
||||||
resize_keyboard: bool = False,
|
resize_keyboard: bool = False,
|
||||||
one_time_keyboard: bool = False,
|
one_time_keyboard: bool = False,
|
||||||
selective: bool = False,
|
selective: bool = False,
|
||||||
**kwargs: Any, # pylint: disable=W0613
|
**kwargs: Any,
|
||||||
) -> 'ReplyKeyboardMarkup':
|
) -> 'ReplyKeyboardMarkup':
|
||||||
"""Shortcut for::
|
"""Shortcut for::
|
||||||
|
|
||||||
|
|
|
@ -55,7 +55,7 @@ class ReplyKeyboardRemove(ReplyMarkup):
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(self, selective: bool = False, **kwargs: Any): # pylint: disable=W0613
|
def __init__(self, selective: bool = False, **_kwargs: Any):
|
||||||
# Required
|
# Required
|
||||||
self.remove_keyboard = True
|
self.remove_keyboard = True
|
||||||
# Optionals
|
# Optionals
|
||||||
|
|
|
@ -98,7 +98,7 @@ class Update(TelegramObject):
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self, # pylint: disable=W0613
|
self,
|
||||||
update_id: int,
|
update_id: int,
|
||||||
message: Message = None,
|
message: Message = None,
|
||||||
edited_message: Message = None,
|
edited_message: Message = None,
|
||||||
|
@ -111,7 +111,7 @@ class Update(TelegramObject):
|
||||||
pre_checkout_query: PreCheckoutQuery = None,
|
pre_checkout_query: PreCheckoutQuery = None,
|
||||||
poll: Poll = None,
|
poll: Poll = None,
|
||||||
poll_answer: PollAnswer = None,
|
poll_answer: PollAnswer = None,
|
||||||
**kwargs: Any,
|
**_kwargs: Any,
|
||||||
):
|
):
|
||||||
# Required
|
# Required
|
||||||
self.update_id = int(update_id)
|
self.update_id = int(update_id)
|
||||||
|
|
|
@ -68,7 +68,7 @@ class User(TelegramObject):
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self, # pylint: disable=W0613
|
self,
|
||||||
id: int,
|
id: int,
|
||||||
first_name: str,
|
first_name: str,
|
||||||
is_bot: bool,
|
is_bot: bool,
|
||||||
|
@ -79,7 +79,7 @@ class User(TelegramObject):
|
||||||
can_read_all_group_messages: bool = None,
|
can_read_all_group_messages: bool = None,
|
||||||
supports_inline_queries: bool = None,
|
supports_inline_queries: bool = None,
|
||||||
bot: 'Bot' = None,
|
bot: 'Bot' = None,
|
||||||
**kwargs: Any,
|
**_kwargs: Any,
|
||||||
):
|
):
|
||||||
# Required
|
# Required
|
||||||
self.id = int(id)
|
self.id = int(id)
|
||||||
|
|
|
@ -44,9 +44,7 @@ class UserProfilePhotos(TelegramObject):
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(
|
def __init__(self, total_count: int, photos: List[List[PhotoSize]], **_kwargs: Any):
|
||||||
self, total_count: int, photos: List[List[PhotoSize]], **kwargs: Any
|
|
||||||
): # pylint: disable=W0613
|
|
||||||
# Required
|
# Required
|
||||||
self.total_count = int(total_count)
|
self.total_count = int(total_count)
|
||||||
self.photos = photos
|
self.photos = photos
|
||||||
|
|
|
@ -61,7 +61,7 @@ class WebhookInfo(TelegramObject):
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self, # pylint: disable=W0613
|
self,
|
||||||
url: str,
|
url: str,
|
||||||
has_custom_certificate: bool,
|
has_custom_certificate: bool,
|
||||||
pending_update_count: int,
|
pending_update_count: int,
|
||||||
|
@ -69,7 +69,7 @@ class WebhookInfo(TelegramObject):
|
||||||
last_error_message: str = None,
|
last_error_message: str = None,
|
||||||
max_connections: int = None,
|
max_connections: int = None,
|
||||||
allowed_updates: List[str] = None,
|
allowed_updates: List[str] = None,
|
||||||
**kwargs: Any,
|
**_kwargs: Any,
|
||||||
):
|
):
|
||||||
# Required
|
# Required
|
||||||
self.url = url
|
self.url = url
|
||||||
|
|
Loading…
Reference in a new issue