From 76a72e9742550774a378bc3860107ef6f1e74c8b Mon Sep 17 00:00:00 2001 From: Pieter Schutz Date: Thu, 1 Nov 2018 10:52:36 +0100 Subject: [PATCH] fix last flake8 errors --- .pre-commit-config.yaml | 2 ++ telegram/__init__.py | 2 +- tests/test_messagequeue.py | 5 ++--- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index b579f4b14..2792e1e03 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -10,6 +10,8 @@ hooks: - id: flake8 exclude: ^(setup.py|docs/source/conf.py)$ + args: + - --ignore=W605 - repo: git://github.com/pre-commit/mirrors-pylint sha: v1.7.1 hooks: diff --git a/telegram/__init__.py b/telegram/__init__.py index fdc75f46f..db5c682d9 100644 --- a/telegram/__init__.py +++ b/telegram/__init__.py @@ -118,7 +118,7 @@ from .passport.credentials import (Credentials, SecureData, FileCredentials, TelegramDecryptionError) -from .version import __version__ # flake8: noqa +from .version import __version__ # noqa: F401 __author__ = 'devs@python-telegram-bot.org' diff --git a/tests/test_messagequeue.py b/tests/test_messagequeue.py index 6e371a64d..97ed3bf39 100644 --- a/tests/test_messagequeue.py +++ b/tests/test_messagequeue.py @@ -45,9 +45,8 @@ class TestDelayQueue(object): dsp(self.call) starttime = mq.curtime() - app_endtime = ( - (self.N * self.burst_limit / - (1000 * self.time_limit_ms)) + starttime + 20) # wait up to 20 sec more than needed + # wait up to 20 sec more than needed + app_endtime = ((self.N * self.burst_limit / (1000 * self.time_limit_ms)) + starttime + 20) while not dsp._queue.empty() and mq.curtime() < app_endtime: sleep(1) assert dsp._queue.empty() is True # check loop exit condition