mirror of https://github.com/tqdm/tqdm.git
minor linting, sync readme
This commit is contained in:
parent
ee651fd855
commit
571f0ed3dd
|
@ -7,9 +7,9 @@ from os import path
|
|||
import re
|
||||
import sys
|
||||
|
||||
sys.path.insert(0, path.dirname(path.dirname(__file__))) # NOQA
|
||||
import tqdm
|
||||
import tqdm.cli
|
||||
sys.path.insert(0, path.dirname(path.dirname(__file__)))
|
||||
import tqdm # NOQA
|
||||
import tqdm.cli # NOQA
|
||||
|
||||
RE_OPT = re.compile(r'(\w+) :', flags=re.M)
|
||||
RE_OPT_INPUT = re.compile(
|
||||
|
|
|
@ -7,9 +7,9 @@ from os import path
|
|||
import sys
|
||||
from textwrap import dedent
|
||||
|
||||
sys.path.insert(0, path.dirname(path.dirname(__file__))) # NOQA
|
||||
import tqdm
|
||||
import tqdm.cli
|
||||
sys.path.insert(0, path.dirname(path.dirname(__file__)))
|
||||
import tqdm # NOQA
|
||||
import tqdm.cli # NOQA
|
||||
|
||||
|
||||
HEAD_ARGS = """
|
||||
|
|
|
@ -876,7 +876,7 @@ The ``requests`` equivalent is nearly identical, albeit with a ``total``:
|
|||
response = requests.get(eg_link, stream=True)
|
||||
with tqdm.wrapattr(open(os.devnull, "wb"), "write",
|
||||
miniters=1, desc=eg_link.split('/')[-1],
|
||||
total=response.headers.get('content-length')) as fout:
|
||||
total=int(response.headers.get('content-length', 0))) as fout:
|
||||
for chunk in response.iter_content(chunk_size=4096):
|
||||
fout.write(chunk)
|
||||
|
||||
|
|
Loading…
Reference in New Issue