Reformat the files with black
This commit is contained in:
parent
3d74c5ff7e
commit
2655aa8fa5
8 changed files with 30 additions and 20 deletions
|
@ -15,7 +15,7 @@ def load(url, user_agent):
|
|||
"""Initializes a `PIL.Image` from the URL."""
|
||||
with requests.get(url, stream=True, headers={"User-Agent": user_agent}) as resp:
|
||||
resp.raise_for_status()
|
||||
if not resp.headers.get('content-type').startswith('image/'):
|
||||
if not resp.headers.get("content-type").startswith("image/"):
|
||||
raise ValueError(f"bad content-type {resp.headers.get('content-type')}")
|
||||
|
||||
resp.raw.decode_content = True
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue