Skip to content

Commit adb446a

Browse files
committed
fix pep8 styling
1 parent 545767e commit adb446a

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

telegram/utils/botan.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@
1414

1515
class Botan(object):
1616
token = ''
17-
url_template = 'https://api.botan.io/track?token={token}&uid={uid}&name={name}'
17+
url_template = 'https://api.botan.io/track?' \
18+
'token={token}&uid={uid}&name={name}'
1819

1920
def __init__(self, token):
2021
self.token = token
@@ -27,7 +28,9 @@ def track(self, message, event_name='event'):
2728
return False
2829
data = json.dumps(message.__dict__)
2930
try:
30-
url = self.url_template.format(token=str(self.token), uid=str(uid), name=quote(event_name))
31+
url = self.url_template.format(token=str(self.token),
32+
uid=str(uid),
33+
name=quote(event_name))
3134
request = Request(url,
3235
data=data,
3336
headers={'Content-Type': 'application/json'})
@@ -39,4 +42,3 @@ def track(self, message, event_name='event'):
3942
print('botan track error ' + str(error.code) + ':' + error.reason)
4043
print(url)
4144
return False
42-

0 commit comments

Comments
 (0)