Fixes PEP8 and Lint minor issues

This commit is contained in:
Leandro Toledo 2015-11-10 12:10:50 -02:00
parent 06c09b96cf
commit 6c13762c93
3 changed files with 11 additions and 8 deletions

View file

@ -1,4 +1,4 @@
.PHONY: clean pep8 lint test
.PHONY: clean pep8 lint test install
clean:
rm -fr build
@ -16,6 +16,9 @@ lint:
test:
nosetests
install:
pip install -r requirements.txt
help:
@echo "Available targets:"
@echo "- clean Clean up the source directory"

View file

@ -17,7 +17,8 @@
# You should have received a copy of the GNU Lesser Public License
# along with this program. If not, see [http://www.gnu.org/licenses/].
"""This module contains a object that represents a Telegram Message Parse Modes"""
"""This module contains a object that represents a Telegram
Message Parse Modes"""
class ParseMode(object):

View file

@ -23,13 +23,12 @@ import json
from ssl import SSLError
try:
from urllib.parse import urlencode
from urllib.request import urlopen, urlretrieve, Request
from urllib.error import HTTPError, URLError
from urllib.error import HTTPError
except ImportError:
from urllib import urlencode, urlretrieve
from urllib import urlretrieve
from urllib2 import urlopen, Request
from urllib2 import HTTPError, URLError
from urllib2 import HTTPError
from telegram import (InputFile, TelegramError)
@ -82,8 +81,8 @@ def post(url,
# Add one second to the timeout of urlopen to allow data to be transferred
# over the network.
if "timeout" in data:
timeout = data["timeout"] + 1.
if 'timeout' in data:
timeout = data['timeout'] + 1.
else:
timeout = None