Skip to content

Commit 6e9f30c

Browse files
committed
fix merge conflict snakes
2 parents 5971cb3 + 252cafb commit 6e9f30c

File tree

9 files changed

+27
-9
lines changed

9 files changed

+27
-9
lines changed

CHANGES.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
**2016-05-01**
2+
3+
*Released 4.0.3*
4+
5+
- Add missing attribute ``location`` to ``InlineQuery``
6+
17
**2016-04-29**
28

39
*Released 4.0.2*

README.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,6 @@ answerCallbackQuery Yes
110110
editMessageText Yes
111111
editMessageCaption Yes
112112
editMessageReplyMarkup Yes
113-
answerCallbackQuery Yes
114113
========================= ============
115114

116115
=============

docs/source/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
# The short X.Y version.
6161
version = '4.0'
6262
# The full version, including alpha/beta/rc tags.
63-
release = '4.0.2'
63+
release = '4.0.3'
6464

6565
# The language for content autogenerated by Sphinx. Refer to documentation
6666
# for a list of supported languages.

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ def requirements():
2626

2727
setup(
2828
name='python-telegram-bot',
29-
version='4.0.2',
29+
version='4.0.3',
3030
author='Leandro Toledo',
3131
author_email='devs@python-telegram-bot.org',
3232
license='LGPLv3',

telegram/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@
8383

8484

8585
__author__ = 'devs@python-telegram-bot.org'
86-
__version__ = '4.0.2'
86+
__version__ = '4.0.3'
8787
__all__ = ['Audio',
8888
'Bot',
8989
'Chat',

telegram/bot.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1293,7 +1293,7 @@ def getUpdates(self,
12931293
long for data to be transmitted from and to the Telegram servers.
12941294
12951295
Returns:
1296-
list[:class:`telegram.Message`]: A list of :class:`telegram.Update`
1296+
list[:class:`telegram.Update`]: A list of :class:`telegram.Update`
12971297
objects are returned.
12981298
12991299
Raises:

telegram/inlinekeyboardmarkup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,10 @@ class InlineKeyboardMarkup(ReplyMarkup):
2727
"""This object represents a Telegram InlineKeyboardMarkup.
2828
2929
Attributes:
30-
inline_keyboard (List[List[:class:`telegram.InlineKeyboardMarkup`]]):
30+
inline_keyboard (List[List[:class:`telegram.InlineKeyboardButton`]]):
3131
3232
Args:
33-
inline_keyboard (List[List[:class:`telegram.InlineKeyboardMarkup`]]):
33+
inline_keyboard (List[List[:class:`telegram.InlineKeyboardButton`]]):
3434
3535
"""
3636

telegram/inlinequery.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
"""This module contains a object that represents a Telegram InlineQuery"""
2121

22-
from telegram import TelegramObject, User
22+
from telegram import TelegramObject, User, Location
2323

2424

2525
class InlineQuery(TelegramObject):
@@ -39,6 +39,10 @@ class InlineQuery(TelegramObject):
3939
from_user (:class:`telegram.User`):
4040
query (str):
4141
offset (str):
42+
**kwargs: Arbitrary keyword arguments.
43+
44+
Keyword Args:
45+
location (optional[:class:`telegram.Location`]):
4246
"""
4347

4448
def __init__(self,
@@ -53,6 +57,9 @@ def __init__(self,
5357
self.query = query
5458
self.offset = offset
5559

60+
# Optional
61+
self.location = kwargs.get('location')
62+
5663
@staticmethod
5764
def de_json(data):
5865
"""
@@ -68,6 +75,7 @@ def de_json(data):
6875
return None
6976

7077
data['from_user'] = User.de_json(data.get('from'))
78+
data['location'] = Location.de_json(data.get('location'))
7179

7280
return InlineQuery(**data)
7381

tests/test_inlinequery.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,17 +37,20 @@ class InlineQueryTest(BaseTest, unittest.TestCase):
3737

3838
def setUp(self):
3939
user = telegram.User(1, 'First name')
40+
location = telegram.Location(8.8, 53.1)
4041

4142
self.id = 'id'
4243
self.from_user = user
4344
self.query = 'query text'
4445
self.offset = 'offset'
46+
self.location = location
4547

4648
self.json_dict = {
4749
'id': self.id,
4850
'from': self.from_user.to_dict(),
4951
'query': self.query,
50-
'offset': self.offset
52+
'offset': self.offset,
53+
'location': self.location.to_dict()
5154
}
5255

5356
def test_inlinequery_de_json(self):
@@ -56,6 +59,8 @@ def test_inlinequery_de_json(self):
5659
self.assertEqual(inlinequery.id, self.id)
5760
self.assertDictEqual(inlinequery.from_user.to_dict(),
5861
self.from_user.to_dict())
62+
self.assertDictEqual(inlinequery.location.to_dict(),
63+
self.location.to_dict())
5964
self.assertEqual(inlinequery.query, self.query)
6065
self.assertEqual(inlinequery.offset, self.offset)
6166

0 commit comments

Comments
 (0)