From 32a78722ae2906d5fd9b3d3b2b88ae5854908183 Mon Sep 17 00:00:00 2001 From: Noam Meltzer Date: Wed, 12 Oct 2016 23:33:52 +0300 Subject: [PATCH] yapf fixes --- telegram/animation.py | 4 +--- tests/test_game.py | 28 ++++------------------------ 2 files changed, 5 insertions(+), 27 deletions(-) diff --git a/telegram/animation.py b/telegram/animation.py index e76793920..9c3f9f1f5 100644 --- a/telegram/animation.py +++ b/telegram/animation.py @@ -35,9 +35,7 @@ class Animation(TelegramObject): """ - def __init__(self, - file_id, - **kwargs): + def __init__(self, file_id, **kwargs): self.file_id = file_id self.thumb = kwargs.get('thumb') self.file_name = kwargs.get('file_name') diff --git a/tests/test_game.py b/tests/test_game.py index d006524f8..b5c431d22 100644 --- a/tests/test_game.py +++ b/tests/test_game.py @@ -34,25 +34,10 @@ class GameTest(BaseTest, unittest.TestCase): def setUp(self): self.title = 'Python-telegram-bot Test Game' self.description = 'description' - self.photo = [ - { - 'width': 640, - 'height': 360, - 'file_id': 'Blah', - 'file_size': 0 - } - ] + self.photo = [{'width': 640, 'height': 360, 'file_id': 'Blah', 'file_size': 0}] self.text = 'Other description' - self.text_entities = [ - { - 'offset': 13, - 'length': 17, - 'type': telegram.MessageEntity.URL - } - ] - self.animation = { - 'file_id': 'Blah' - } + self.text_entities = [{'offset': 13, 'length': 17, 'type': telegram.MessageEntity.URL}] + self.animation = {'file_id': 'Blah'} self.json_dict = { 'title': self.title, @@ -120,12 +105,7 @@ class AnimationTest(BaseTest, unittest.TestCase): def setUp(self): self.file_id = 'thisisafileid' - self.thumb = { - 'width': 640, - 'height': 360, - 'file_id': 'Blah', - 'file_size': 0 - } + self.thumb = {'width': 640, 'height': 360, 'file_id': 'Blah', 'file_size': 0} self.file_name = 'File name' self.mime_type = 'something/gif' self.file_size = 42