Skip to content

Commit d445d35

Browse files
committed
Running yapf for codebase python-telegram-bot#259
1 parent 703b8d1 commit d445d35

File tree

79 files changed

+312
-695
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

79 files changed

+312
-695
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
sha: 'v0.7.1'
33
hooks:
44
- id: yapf
5-
args: ['-i', '-r']
65

76
- repo: git://github.com/pre-commit/pre-commit-hooks
87
sha: 'v0.5.0'
@@ -14,4 +13,4 @@
1413
sha: 'v1.5.5'
1514
hooks:
1615
- id: pylint
17-
args: ['--errors-only', '--disable=no-name-in-module,import-error']
16+
args: ['--errors-only', '--disable=no-name-in-module,import-error', 'telegram']

telegram/__init__.py

Lines changed: 16 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
#
1717
# You should have received a copy of the GNU Lesser Public License
1818
# along with this program. If not, see [http://www.gnu.org/licenses/].
19-
2019
"""A library that provides a Python interface to the Telegram Bot API"""
2120

2221
from sys import version_info
@@ -81,70 +80,24 @@
8180
from .update import Update
8281
from .bot import Bot
8382

84-
8583
__author__ = 'devs@python-telegram-bot.org'
8684
__version__ = '4.0.3'
87-
__all__ = ['Audio',
88-
'Bot',
89-
'Chat',
90-
'ChatAction',
91-
'ChosenInlineResult',
92-
'CallbackQuery',
93-
'Contact',
94-
'Document',
95-
'Emoji',
96-
'File',
97-
'ForceReply',
98-
'InlineKeyboardButton',
99-
'InlineKeyboardMarkup',
100-
'InlineQuery',
101-
'InlineQueryResult',
102-
'InlineQueryResult',
103-
'InlineQueryResultArticle',
104-
'InlineQueryResultAudio',
105-
'InlineQueryResultCachedAudio',
106-
'InlineQueryResultCachedDocument',
107-
'InlineQueryResultCachedGif',
108-
'InlineQueryResultCachedMpeg4Gif',
109-
'InlineQueryResultCachedPhoto',
110-
'InlineQueryResultCachedSticker',
111-
'InlineQueryResultCachedVideo',
112-
'InlineQueryResultCachedVoice',
113-
'InlineQueryResultContact',
114-
'InlineQueryResultDocument',
115-
'InlineQueryResultGif',
116-
'InlineQueryResultLocation',
117-
'InlineQueryResultMpeg4Gif',
118-
'InlineQueryResultPhoto',
119-
'InlineQueryResultVenue',
120-
'InlineQueryResultVideo',
121-
'InlineQueryResultVoice',
122-
'InputContactMessageContent',
123-
'InputFile',
124-
'InputLocationMessageContent',
125-
'InputMessageContent',
126-
'InputTextMessageContent',
127-
'InputVenueMessageContent',
128-
'KeyboardButton',
129-
'Location',
130-
'Message',
131-
'MessageEntity',
132-
'NullHandler',
133-
'ParseMode',
134-
'PhotoSize',
135-
'ReplyKeyboardHide',
136-
'ReplyKeyboardMarkup',
137-
'ReplyMarkup',
138-
'Sticker',
139-
'TelegramError',
140-
'TelegramObject',
141-
'Update',
142-
'User',
143-
'UserProfilePhotos',
144-
'Venue',
145-
'Video',
146-
'Voice']
147-
85+
__all__ = ['Audio', 'Bot', 'Chat', 'ChatAction', 'ChosenInlineResult', 'CallbackQuery', 'Contact',
86+
'Document', 'Emoji', 'File', 'ForceReply', 'InlineKeyboardButton',
87+
'InlineKeyboardMarkup', 'InlineQuery', 'InlineQueryResult', 'InlineQueryResult',
88+
'InlineQueryResultArticle', 'InlineQueryResultAudio', 'InlineQueryResultCachedAudio',
89+
'InlineQueryResultCachedDocument', 'InlineQueryResultCachedGif',
90+
'InlineQueryResultCachedMpeg4Gif', 'InlineQueryResultCachedPhoto',
91+
'InlineQueryResultCachedSticker', 'InlineQueryResultCachedVideo',
92+
'InlineQueryResultCachedVoice', 'InlineQueryResultContact', 'InlineQueryResultDocument',
93+
'InlineQueryResultGif', 'InlineQueryResultLocation', 'InlineQueryResultMpeg4Gif',
94+
'InlineQueryResultPhoto', 'InlineQueryResultVenue', 'InlineQueryResultVideo',
95+
'InlineQueryResultVoice', 'InputContactMessageContent', 'InputFile',
96+
'InputLocationMessageContent', 'InputMessageContent', 'InputTextMessageContent',
97+
'InputVenueMessageContent', 'KeyboardButton', 'Location', 'Message', 'MessageEntity',
98+
'NullHandler', 'ParseMode', 'PhotoSize', 'ReplyKeyboardHide', 'ReplyKeyboardMarkup',
99+
'ReplyMarkup', 'Sticker', 'TelegramError', 'TelegramObject', 'Update', 'User',
100+
'UserProfilePhotos', 'Venue', 'Video', 'Voice']
148101

149102
if version_info < (2, 7):
150103
from warnings import warn

telegram/audio.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
#
1717
# You should have received a copy of the GNU Lesser Public License
1818
# along with this program. If not, see [http://www.gnu.org/licenses/].
19-
2019
"""This module contains a object that represents a Telegram Audio."""
2120

2221
from telegram import TelegramObject
@@ -45,10 +44,7 @@ class Audio(TelegramObject):
4544
file_size (Optional[int]):
4645
"""
4746

48-
def __init__(self,
49-
file_id,
50-
duration,
51-
**kwargs):
47+
def __init__(self, file_id, duration, **kwargs):
5248
# Required
5349
self.file_id = str(file_id)
5450
self.duration = int(duration)

telegram/base.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
#
1717
# You should have received a copy of the GNU Lesser Public License
1818
# along with this program. If not, see [http://www.gnu.org/licenses/].
19-
2019
"""Base class for Telegram Objects."""
2120

2221
import json

0 commit comments

Comments
 (0)