X Tutup
Skip to content

Commit 3df9d2b

Browse files
committed
Working on Python 3 support
1 parent 4a2c09e commit 3df9d2b

File tree

5 files changed

+30
-27
lines changed

5 files changed

+30
-27
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ clean:
1111
find . -name '*~' -exec rm -f {} \;
1212

1313
lint:
14-
flake8 telegram
14+
flake8 --doctests --max-complexity 10 telegram
1515

1616
test:
1717
python telegram_test.py

telegram/__init__.py

Lines changed: 26 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,34 @@
11
#!/usr/bin/env python
2-
# flake8: noqa
32

43
"""A library that provides a Python interface to the Telegram Bots API"""
54

65
__author__ = 'leandrotoledodesouza@gmail.com'
76
__version__ = '1.1'
87

9-
import json
8+
from .user import User
9+
from .message import Message
10+
from .update import Update
11+
from .groupchat import GroupChat
12+
from .photosize import PhotoSize
13+
from .audio import Audio
14+
from .document import Document
15+
from .sticker import Sticker
16+
from .video import Video
17+
from .contact import Contact
18+
from .location import Location
19+
from .chataction import ChatAction
20+
from .userprofilephotos import UserProfilePhotos
21+
from .replykeyboardmarkup import ReplyKeyboardMarkup
22+
from .replykeyboardhide import ReplyKeyboardHide
23+
from .forcereply import ForceReply
24+
from .replymarkup import ReplyMarkup
25+
from .inputfile import InputFile
26+
from .error import TelegramError
27+
from .emoji import Emoji
28+
from .bot import Bot
1029

11-
from user import User
12-
from message import Message
13-
from update import Update
14-
from groupchat import GroupChat
15-
from photosize import PhotoSize
16-
from audio import Audio
17-
from document import Document
18-
from sticker import Sticker
19-
from video import Video
20-
from contact import Contact
21-
from location import Location
22-
from chataction import ChatAction
23-
from userprofilephotos import UserProfilePhotos
24-
from replykeyboardmarkup import ReplyKeyboardMarkup
25-
from replykeyboardhide import ReplyKeyboardHide
26-
from forcereply import ForceReply
27-
from replymarkup import ReplyMarkup
28-
from inputfile import InputFile
29-
from error import TelegramError
30-
from emoji import Emoji
31-
from bot import Bot
30+
__all__ = ['Bot', 'Emoji', 'TelegramError', 'InputFile', 'ReplyMarkup',
31+
'ForceReply', 'ReplyKeyboardHide', 'ReplyKeyboardMarkup',
32+
'UserProfilePhotos', 'ChatAction', 'Location', 'Contact',
33+
'Video', 'Sticker', 'Document', 'Audio', 'PhotoSize', 'GroupChat',
34+
'Update', 'Message', 'User']

telegram/forcereply.py

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

33

44
import json
5-
from replymarkup import ReplyMarkup
5+
from .replymarkup import ReplyMarkup
66

77

88
class ForceReply(ReplyMarkup):

telegram/replykeyboardhide.py

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

33

44
import json
5-
from replymarkup import ReplyMarkup
5+
from .replymarkup import ReplyMarkup
66

77

88
class ReplyKeyboardHide(ReplyMarkup):

telegram/replykeyboardmarkup.py

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

33

44
import json
5-
from replymarkup import ReplyMarkup
5+
from .replymarkup import ReplyMarkup
66

77

88
class ReplyKeyboardMarkup(ReplyMarkup):

0 commit comments

Comments
 (0)
X Tutup