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 re
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
sys.path.insert(0, path.dirname(path.dirname(__file__))) # NOQA
|
sys.path.insert(0, path.dirname(path.dirname(__file__)))
|
||||||
import tqdm
|
import tqdm # NOQA
|
||||||
import tqdm.cli
|
import tqdm.cli # NOQA
|
||||||
|
|
||||||
RE_OPT = re.compile(r'(\w+) :', flags=re.M)
|
RE_OPT = re.compile(r'(\w+) :', flags=re.M)
|
||||||
RE_OPT_INPUT = re.compile(
|
RE_OPT_INPUT = re.compile(
|
||||||
|
|
|
@ -7,9 +7,9 @@ from os import path
|
||||||
import sys
|
import sys
|
||||||
from textwrap import dedent
|
from textwrap import dedent
|
||||||
|
|
||||||
sys.path.insert(0, path.dirname(path.dirname(__file__))) # NOQA
|
sys.path.insert(0, path.dirname(path.dirname(__file__)))
|
||||||
import tqdm
|
import tqdm # NOQA
|
||||||
import tqdm.cli
|
import tqdm.cli # NOQA
|
||||||
|
|
||||||
|
|
||||||
HEAD_ARGS = """
|
HEAD_ARGS = """
|
||||||
|
|
|
@ -876,7 +876,7 @@ The ``requests`` equivalent is nearly identical, albeit with a ``total``:
|
||||||
response = requests.get(eg_link, stream=True)
|
response = requests.get(eg_link, stream=True)
|
||||||
with tqdm.wrapattr(open(os.devnull, "wb"), "write",
|
with tqdm.wrapattr(open(os.devnull, "wb"), "write",
|
||||||
miniters=1, desc=eg_link.split('/')[-1],
|
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):
|
for chunk in response.iter_content(chunk_size=4096):
|
||||||
fout.write(chunk)
|
fout.write(chunk)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue