mirror of https://github.com/tqdm/tqdm.git
linting/fix flake8
This commit is contained in:
parent
c9413dfbe9
commit
a46caa4ba4
|
@ -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:
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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__
|
||||
|
|
2
tox.ini
2
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 =
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue