fix last flake8 errors

This commit is contained in:
Pieter Schutz 2018-11-01 10:52:36 +01:00
parent 30cc0f8cf9
commit 76a72e9742
3 changed files with 5 additions and 4 deletions

View file

@ -10,6 +10,8 @@
hooks: hooks:
- id: flake8 - id: flake8
exclude: ^(setup.py|docs/source/conf.py)$ exclude: ^(setup.py|docs/source/conf.py)$
args:
- --ignore=W605
- repo: git://github.com/pre-commit/mirrors-pylint - repo: git://github.com/pre-commit/mirrors-pylint
sha: v1.7.1 sha: v1.7.1
hooks: hooks:

View file

@ -118,7 +118,7 @@ from .passport.credentials import (Credentials,
SecureData, SecureData,
FileCredentials, FileCredentials,
TelegramDecryptionError) TelegramDecryptionError)
from .version import __version__ # flake8: noqa from .version import __version__ # noqa: F401
__author__ = 'devs@python-telegram-bot.org' __author__ = 'devs@python-telegram-bot.org'

View file

@ -45,9 +45,8 @@ class TestDelayQueue(object):
dsp(self.call) dsp(self.call)
starttime = mq.curtime() starttime = mq.curtime()
app_endtime = ( # wait up to 20 sec more than needed
(self.N * self.burst_limit / app_endtime = ((self.N * self.burst_limit / (1000 * self.time_limit_ms)) + starttime + 20)
(1000 * self.time_limit_ms)) + starttime + 20) # wait up to 20 sec more than needed
while not dsp._queue.empty() and mq.curtime() < app_endtime: while not dsp._queue.empty() and mq.curtime() < app_endtime:
sleep(1) sleep(1)
assert dsp._queue.empty() is True # check loop exit condition assert dsp._queue.empty() is True # check loop exit condition