Skip to content

Commit 49122d6

Browse files
committed
Remove \ from base code python-telegram-bot#259
1 parent d445d35 commit 49122d6

26 files changed

+52
-77
lines changed

.pre-commit-config.yaml

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

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

telegram/bot.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@
2222
import logging
2323
import functools
2424

25-
from telegram import User, Message, Update, UserProfilePhotos, File, \
26-
ReplyMarkup, TelegramObject, NullHandler
25+
from telegram import (User, Message, Update, UserProfilePhotos, File, ReplyMarkup, TelegramObject,
26+
NullHandler)
2727
from telegram.utils import request
2828
from telegram.utils.validate import validate_token
2929

@@ -120,12 +120,10 @@ def decorator(self, *args, **kwargs):
120120
url, data = func(self, *args, **kwargs)
121121

122122
if kwargs.get('reply_to_message_id'):
123-
data['reply_to_message_id'] = \
124-
kwargs.get('reply_to_message_id')
123+
data['reply_to_message_id'] = kwargs.get('reply_to_message_id')
125124

126125
if kwargs.get('disable_notification'):
127-
data['disable_notification'] = \
128-
kwargs.get('disable_notification')
126+
data['disable_notification'] = kwargs.get('disable_notification')
129127

130128
if kwargs.get('reply_markup'):
131129
reply_markup = kwargs.get('reply_markup')

telegram/emoji.py

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env python
22
# flake8: noqa
3-
# pylint: disable=C0103,C0301,R0903
3+
# pylint: disable=C0103,R0903
44
#
55
# A library that provides a Python interface to the Telegram Bot API
66
# Copyright (C) 2015-2016
@@ -162,26 +162,26 @@ class Emoji(object):
162162
SQUARED_SOS = n(b'\xF0\x9F\x86\x98')
163163
SQUARED_UP_WITH_EXCLAMATION_MARK = n(b'\xF0\x9F\x86\x99')
164164
SQUARED_VS = n(b'\xF0\x9F\x86\x9A')
165-
REGIONAL_INDICATOR_SYMBOL_LETTER_D_PLUS_REGIONAL_INDICATOR_SYMBOL_LETTER_E \
166-
= n(b'\xF0\x9F\x87\xA9\xF0\x9F\x87\xAA')
167-
REGIONAL_INDICATOR_SYMBOL_LETTER_G_PLUS_REGIONAL_INDICATOR_SYMBOL_LETTER_B \
168-
= n(b'\xF0\x9F\x87\xAC\xF0\x9F\x87\xA7')
169-
REGIONAL_INDICATOR_SYMBOL_LETTER_C_PLUS_REGIONAL_INDICATOR_SYMBOL_LETTER_N \
170-
= n(b'\xF0\x9F\x87\xA8\xF0\x9F\x87\xB3')
171-
REGIONAL_INDICATOR_SYMBOL_LETTER_J_PLUS_REGIONAL_INDICATOR_SYMBOL_LETTER_P \
172-
= n(b'\xF0\x9F\x87\xAF\xF0\x9F\x87\xB5')
173-
REGIONAL_INDICATOR_SYMBOL_LETTER_K_PLUS_REGIONAL_INDICATOR_SYMBOL_LETTER_R \
174-
= n(b'\xF0\x9F\x87\xB0\xF0\x9F\x87\xB7')
175-
REGIONAL_INDICATOR_SYMBOL_LETTER_F_PLUS_REGIONAL_INDICATOR_SYMBOL_LETTER_R \
176-
= n(b'\xF0\x9F\x87\xAB\xF0\x9F\x87\xB7')
177-
REGIONAL_INDICATOR_SYMBOL_LETTER_E_PLUS_REGIONAL_INDICATOR_SYMBOL_LETTER_S \
178-
= n(b'\xF0\x9F\x87\xAA\xF0\x9F\x87\xB8')
179-
REGIONAL_INDICATOR_SYMBOL_LETTER_I_PLUS_REGIONAL_INDICATOR_SYMBOL_LETTER_T \
180-
= n(b'\xF0\x9F\x87\xAE\xF0\x9F\x87\xB9')
181-
REGIONAL_INDICATOR_SYMBOL_LETTER_U_PLUS_REGIONAL_INDICATOR_SYMBOL_LETTER_S \
182-
= n(b'\xF0\x9F\x87\xBA\xF0\x9F\x87\xB8')
183-
REGIONAL_INDICATOR_SYMBOL_LETTER_R_PLUS_REGIONAL_INDICATOR_SYMBOL_LETTER_U \
184-
= n(b'\xF0\x9F\x87\xB7\xF0\x9F\x87\xBA')
165+
REGIONAL_INDICATOR_SYMBOL_LETTER_D_PLUS_REGIONAL_INDICATOR_SYMBOL_LETTER_E = n(
166+
b'\xF0\x9F\x87\xA9\xF0\x9F\x87\xAA')
167+
REGIONAL_INDICATOR_SYMBOL_LETTER_G_PLUS_REGIONAL_INDICATOR_SYMBOL_LETTER_B = n(
168+
b'\xF0\x9F\x87\xAC\xF0\x9F\x87\xA7')
169+
REGIONAL_INDICATOR_SYMBOL_LETTER_C_PLUS_REGIONAL_INDICATOR_SYMBOL_LETTER_N = n(
170+
b'\xF0\x9F\x87\xA8\xF0\x9F\x87\xB3')
171+
REGIONAL_INDICATOR_SYMBOL_LETTER_J_PLUS_REGIONAL_INDICATOR_SYMBOL_LETTER_P = n(
172+
b'\xF0\x9F\x87\xAF\xF0\x9F\x87\xB5')
173+
REGIONAL_INDICATOR_SYMBOL_LETTER_K_PLUS_REGIONAL_INDICATOR_SYMBOL_LETTER_R = n(
174+
b'\xF0\x9F\x87\xB0\xF0\x9F\x87\xB7')
175+
REGIONAL_INDICATOR_SYMBOL_LETTER_F_PLUS_REGIONAL_INDICATOR_SYMBOL_LETTER_R = n(
176+
b'\xF0\x9F\x87\xAB\xF0\x9F\x87\xB7')
177+
REGIONAL_INDICATOR_SYMBOL_LETTER_E_PLUS_REGIONAL_INDICATOR_SYMBOL_LETTER_S = n(
178+
b'\xF0\x9F\x87\xAA\xF0\x9F\x87\xB8')
179+
REGIONAL_INDICATOR_SYMBOL_LETTER_I_PLUS_REGIONAL_INDICATOR_SYMBOL_LETTER_T = n(
180+
b'\xF0\x9F\x87\xAE\xF0\x9F\x87\xB9')
181+
REGIONAL_INDICATOR_SYMBOL_LETTER_U_PLUS_REGIONAL_INDICATOR_SYMBOL_LETTER_S = n(
182+
b'\xF0\x9F\x87\xBA\xF0\x9F\x87\xB8')
183+
REGIONAL_INDICATOR_SYMBOL_LETTER_R_PLUS_REGIONAL_INDICATOR_SYMBOL_LETTER_U = n(
184+
b'\xF0\x9F\x87\xB7\xF0\x9F\x87\xBA')
185185
SQUARED_KATAKANA_KOKO = n(b'\xF0\x9F\x88\x81')
186186
SQUARED_KATAKANA_SA = n(b'\xF0\x9F\x88\x82')
187187
SQUARED_CJK_UNIFIED_IDEOGRAPH_7121 = n(b'\xF0\x9F\x88\x9A')

telegram/inlinekeyboardmarkup.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,8 @@ def de_json(data):
4444
if not data:
4545
return None
4646

47-
data['inline_keyboard'] = \
48-
[InlineKeyboardButton.de_list(inline_keyboard) for inline_keyboard
49-
in data['inline_keyboard']]
47+
data['inline_keyboard'] = [InlineKeyboardButton.de_list(inline_keyboard)
48+
for inline_keyboard in data['inline_keyboard']]
5049

5150
return InlineKeyboardMarkup(**data)
5251

telegram/inlinequeryresultarticle.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,7 @@
1919
"""This module contains the classes that represent Telegram
2020
InlineQueryResultArticle"""
2121

22-
from telegram import InlineQueryResult, InlineKeyboardMarkup, \
23-
InputMessageContent
22+
from telegram import InlineQueryResult, InlineKeyboardMarkup, InputMessageContent
2423

2524

2625
class InlineQueryResultArticle(InlineQueryResult):

telegram/inlinequeryresultaudio.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,7 @@
1919
"""This module contains the classes that represent Telegram
2020
InlineQueryResultAudio"""
2121

22-
from telegram import InlineQueryResult, InlineKeyboardMarkup, \
23-
InputMessageContent
22+
from telegram import InlineQueryResult, InlineKeyboardMarkup, InputMessageContent
2423

2524

2625
class InlineQueryResultAudio(InlineQueryResult):

telegram/inlinequeryresultcachedaudio.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,7 @@
1919
"""This module contains the classes that represent Telegram
2020
InlineQueryResultCachedAudio"""
2121

22-
from telegram import InlineQueryResult, InlineKeyboardMarkup, \
23-
InputMessageContent
22+
from telegram import InlineQueryResult, InlineKeyboardMarkup, InputMessageContent
2423

2524

2625
class InlineQueryResultCachedAudio(InlineQueryResult):

telegram/inlinequeryresultcacheddocument.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,7 @@
1919
"""This module contains the classes that represent Telegram
2020
InlineQueryResultCachedDocument"""
2121

22-
from telegram import InlineQueryResult, InlineKeyboardMarkup, \
23-
InputMessageContent
22+
from telegram import InlineQueryResult, InlineKeyboardMarkup, InputMessageContent
2423

2524

2625
class InlineQueryResultCachedDocument(InlineQueryResult):

telegram/inlinequeryresultcachedgif.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,7 @@
1919
"""This module contains the classes that represent Telegram
2020
InlineQueryResultCachedGif"""
2121

22-
from telegram import InlineQueryResult, InlineKeyboardMarkup, \
23-
InputMessageContent
22+
from telegram import InlineQueryResult, InlineKeyboardMarkup, InputMessageContent
2423

2524

2625
class InlineQueryResultCachedGif(InlineQueryResult):

telegram/inlinequeryresultcachedmpeg4gif.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,7 @@
1919
"""This module contains the classes that represent Telegram
2020
InlineQueryResultMpeg4Gif"""
2121

22-
from telegram import InlineQueryResult, InlineKeyboardMarkup, \
23-
InputMessageContent
22+
from telegram import InlineQueryResult, InlineKeyboardMarkup, InputMessageContent
2423

2524

2625
class InlineQueryResultCachedMpeg4Gif(InlineQueryResult):

0 commit comments

Comments
 (0)