X Tutup
Skip to content

Commit a1ade40

Browse files
committed
🔀 Merge master into dec04
python-telegram-bot#483
2 parents 86c8ebb + 2954ca2 commit a1ade40

Some content is hidden

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

42 files changed

+446
-139
lines changed

.github/CONTRIBUTING.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -184,11 +184,11 @@ break the API classes. For example:
184184
.. code-block:: python
185185
186186
# GOOD
187-
def __init__(self, id, name, last_name='', **kwargs):
187+
def __init__(self, id, name, last_name=None, **kwargs):
188188
self.last_name = last_name
189189
190190
# BAD
191-
def __init__(self, id, name, last_name=''):
191+
def __init__(self, id, name, last_name=None):
192192
self.last_name = last_name
193193
194194

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ python:
44
- "3.3"
55
- "3.4"
66
- "3.5"
7+
- "3.6"
78
- "pypy"
89
- "pypy3"
910
branches:

AUTHORS.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ The following wonderful people contributed directly or indirectly to this projec
1212
- `Anton Tagunov <https://github.com/anton-tagunov>`_
1313
- `Balduro <https://github.com/Balduro>`_
1414
- `bimmlerd <https://github.com/bimmlerd>`_
15+
- `daimajia <https://github.com/daimajia>`_
1516
- `Eli Gao <https://github.com/eligao>`_
1617
- `ErgoZ Riftbit Vaper <https://github.com/ergoz>`_
1718
- `Eugene Lisitsky <https://github.com/lisitsky>`_

examples/conversationbot.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ def main():
149149
# Start the Bot
150150
updater.start_polling()
151151

152-
# Run the bot until the you presses Ctrl-C or the process receives SIGINT,
152+
# Run the bot until you press Ctrl-C or the process receives SIGINT,
153153
# SIGTERM or SIGABRT. This should be used most of the time, since
154154
# start_polling() is non-blocking and will stop the bot gracefully.
155155
updater.idle()

examples/conversationbot2.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ def main():
142142
# Start the Bot
143143
updater.start_polling()
144144

145-
# Run the bot until the you presses Ctrl-C or the process receives SIGINT,
145+
# Run the bot until you press Ctrl-C or the process receives SIGINT,
146146
# SIGTERM or SIGABRT. This should be used most of the time, since
147147
# start_polling() is non-blocking and will stop the bot gracefully.
148148
updater.idle()

examples/echobot2.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ def main():
6464
# Start the Bot
6565
updater.start_polling()
6666

67-
# Run the bot until the you presses Ctrl-C or the process receives SIGINT,
67+
# Run the bot until you press Ctrl-C or the process receives SIGINT,
6868
# SIGTERM or SIGABRT. This should be used most of the time, since
6969
# start_polling() is non-blocking and will stop the bot gracefully.
7070
updater.idle()

examples/timerbot.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,9 +98,9 @@ def main():
9898
# Start the Bot
9999
updater.start_polling()
100100

101-
# Block until the you presses Ctrl-C or the process receives SIGINT,
102-
# SIGTERM or SIGABRT. This should be used most of the time, since
103-
# start_polling() is non-blocking and will stop the bot gracefully.
101+
# Block until you press Ctrl-C or the process receives SIGINT, SIGTERM or
102+
# SIGABRT. This should be used most of the time, since start_polling() is
103+
# non-blocking and will stop the bot gracefully.
104104
updater.idle()
105105

106106

setup.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ def requirements():
3636
install_requires=requirements(),
3737
extras_require={
3838
'json': 'ujson',
39+
'socks': 'PySocks'
3940
},
4041
include_package_data=True,
4142
classifiers=[
@@ -53,4 +54,5 @@ def requirements():
5354
'Programming Language :: Python :: 3.3',
5455
'Programming Language :: Python :: 3.4',
5556
'Programming Language :: Python :: 3.5',
57+
'Programming Language :: Python :: 3.6'
5658
],)

telegram/animation.py

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,18 @@ class Animation(TelegramObject):
3535
3636
"""
3737

38-
def __init__(self, file_id, **kwargs):
38+
def __init__(self,
39+
file_id,
40+
thumb=None,
41+
file_name=None,
42+
mime_type=None,
43+
file_size=None,
44+
**kwargs):
3945
self.file_id = file_id
40-
self.thumb = kwargs.get('thumb')
41-
self.file_name = kwargs.get('file_name')
42-
self.mime_type = kwargs.get('mime_type')
43-
self.file_size = kwargs.get('file_size')
46+
self.thumb = thumb
47+
self.file_name = file_name
48+
self.mime_type = mime_type
49+
self.file_size = file_size
4450

4551
@staticmethod
4652
def de_json(data, bot):

telegram/audio.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,19 +46,19 @@ class Audio(TelegramObject):
4646
def __init__(self,
4747
file_id,
4848
duration,
49-
performer='',
50-
title='',
51-
mime_type='',
52-
file_size=0,
49+
performer=None,
50+
title=None,
51+
mime_type=None,
52+
file_size=None,
5353
**kwargs):
5454
# Required
5555
self.file_id = str(file_id)
5656
self.duration = int(duration)
5757
# Optionals
5858
self.performer = performer
5959
self.title = title
60-
self.mime_type = str(mime_type)
61-
self.file_size = int(file_size)
60+
self.mime_type = mime_type
61+
self.file_size = file_size
6262

6363
@staticmethod
6464
def de_json(data, bot):

0 commit comments

Comments
 (0)
X Tutup