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