From a46caa4ba4a447e423244a56ac06b2e5da164428 Mon Sep 17 00:00:00 2001 From: Casper da Costa-Luis Date: Thu, 31 Oct 2019 19:31:53 +0000 Subject: [PATCH] linting/fix flake8 --- .meta/mkdocs.py | 1 - examples/parallel_bars.py | 3 ++- setup.cfg | 2 +- tox.ini | 2 +- tqdm/tests/tests_main.py | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.meta/mkdocs.py b/.meta/mkdocs.py index a5707f32..d7b858ea 100644 --- a/.meta/mkdocs.py +++ b/.meta/mkdocs.py @@ -29,7 +29,6 @@ def doc2rst(doc, arglist=True, raw=False): doc = doc.replace('`', '``') if raw: doc = doc.replace('\n ', '\n ') - #doc = '\n'.join(i.rstrip() for i in doc.split('\n')) else: doc = dedent(doc) if arglist: diff --git a/examples/parallel_bars.py b/examples/parallel_bars.py index e49a2775..86a49196 100644 --- a/examples/parallel_bars.py +++ b/examples/parallel_bars.py @@ -15,7 +15,8 @@ def progresser(n, auto_position=True, write_safe=False): interval = random() * 0.002 / (NUM_SUBITERS - n + 2) total = 5000 text = "#{}, est. {:<04.2}s".format(n, interval * total) - for _ in tqdm(range(total), desc=text, position=None if auto_position else n): + for _ in trange(total, desc=text, + position=None if auto_position else n): sleep(interval) # NB: may not clear instances with higher `position` upon completion # since this worker may not know about other bars #796 diff --git a/setup.cfg b/setup.cfg index 67afc79d..cd065ddd 100644 --- a/setup.cfg +++ b/setup.cfg @@ -2,6 +2,6 @@ universal = 1 [flake8] -ignore = W503,W504 +ignore = W503,W504,E722 max_line_length = 80 exclude = .asv,.tox,.ipynb_checkpoints,build,dist,.git,__pycache__ diff --git a/tox.ini b/tox.ini index d60a15b4..9c228b57 100644 --- a/tox.ini +++ b/tox.ini @@ -77,7 +77,7 @@ commands = [testenv:flake8] deps = flake8 commands = - flake8 -j 8 --count --statistics --exit-zero . + flake8 -j 8 --count --statistics . [testenv:setup.py] deps = diff --git a/tqdm/tests/tests_main.py b/tqdm/tests/tests_main.py index ac0298b2..573948dd 100644 --- a/tqdm/tests/tests_main.py +++ b/tqdm/tests/tests_main.py @@ -48,7 +48,7 @@ def test_main(): sys.argv = ['', '--desc', 'Test CLI --delim', '--ascii', 'True', '--delim', r'\0', '--buf_size', '64'] sys.stdin.write('\0'.join(map(str, _range(int(123))))) - #sys.stdin.write(b'\xff') # TODO + # sys.stdin.write(b'\xff') # TODO sys.stdin.seek(0) main() sys.stdin = IN_DATA_LIST