minor linting, sync readme

This commit is contained in:
Casper da Costa-Luis 2020-05-22 13:54:09 +01:00
parent ee651fd855
commit 571f0ed3dd
No known key found for this signature in database
GPG Key ID: 986B408043AE090D
3 changed files with 7 additions and 7 deletions

View File

@ -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(

View File

@ -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 = """

View File

@ -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)