X Tutup
Skip to content

Commit 6c13762

Browse files
committed
Fixes PEP8 and Lint minor issues
1 parent 06c09b9 commit 6c13762

File tree

3 files changed

+11
-8
lines changed

3 files changed

+11
-8
lines changed

Makefile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.PHONY: clean pep8 lint test
1+
.PHONY: clean pep8 lint test install
22

33
clean:
44
rm -fr build
@@ -16,6 +16,9 @@ lint:
1616
test:
1717
nosetests
1818

19+
install:
20+
pip install -r requirements.txt
21+
1922
help:
2023
@echo "Available targets:"
2124
@echo "- clean Clean up the source directory"

telegram/parsemode.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@
1717
# You should have received a copy of the GNU Lesser Public License
1818
# along with this program. If not, see [http://www.gnu.org/licenses/].
1919

20-
"""This module contains a object that represents a Telegram Message Parse Modes"""
20+
"""This module contains a object that represents a Telegram
21+
Message Parse Modes"""
2122

2223

2324
class ParseMode(object):

telegram/utils/request.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,12 @@
2323
from ssl import SSLError
2424

2525
try:
26-
from urllib.parse import urlencode
2726
from urllib.request import urlopen, urlretrieve, Request
28-
from urllib.error import HTTPError, URLError
27+
from urllib.error import HTTPError
2928
except ImportError:
30-
from urllib import urlencode, urlretrieve
29+
from urllib import urlretrieve
3130
from urllib2 import urlopen, Request
32-
from urllib2 import HTTPError, URLError
31+
from urllib2 import HTTPError
3332

3433
from telegram import (InputFile, TelegramError)
3534

@@ -82,8 +81,8 @@ def post(url,
8281

8382
# Add one second to the timeout of urlopen to allow data to be transferred
8483
# over the network.
85-
if "timeout" in data:
86-
timeout = data["timeout"] + 1.
84+
if 'timeout' in data:
85+
timeout = data['timeout'] + 1.
8786
else:
8887
timeout = None
8988

0 commit comments

Comments
 (0)
X Tutup