diff --git a/.meta/mkcompletion.py b/.meta/mkcompletion.py index 6fa143a5..4c42c937 100644 --- a/.meta/mkcompletion.py +++ b/.meta/mkcompletion.py @@ -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( diff --git a/.meta/mkdocs.py b/.meta/mkdocs.py index ca6be97e..1fe62d5b 100644 --- a/.meta/mkdocs.py +++ b/.meta/mkdocs.py @@ -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 = """ diff --git a/README.rst b/README.rst index afce8a01..059ef2f3 100644 --- a/README.rst +++ b/README.rst @@ -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)