mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-08-21 04:34:47 +03:00
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
This commit is contained in:
parent
7845b6a459
commit
4e406389cf
|
@ -258,6 +258,7 @@ except ImportError:
|
||||||
else:
|
else:
|
||||||
register(IPythonViewer)
|
register(IPythonViewer)
|
||||||
|
|
||||||
|
|
||||||
class CommandViewer(Viewer):
|
class CommandViewer(Viewer):
|
||||||
"""
|
"""
|
||||||
The viewer that use commands.
|
The viewer that use commands.
|
||||||
|
@ -271,11 +272,13 @@ class CommandViewer(Viewer):
|
||||||
"""
|
"""
|
||||||
|
|
||||||
if not "command" in options:
|
if not "command" in options:
|
||||||
raise TypeError("CommandViewer missing required keyword-only argument 'command'")
|
raise TypeError(
|
||||||
|
"CommandViewer missing required keyword-only argument 'command'"
|
||||||
|
)
|
||||||
command = options["command"]
|
command = options["command"]
|
||||||
if not isinstance(command, str):
|
if not isinstance(command, str):
|
||||||
raise TypeError(f"'command' must be 'str' not '{type(command)}'")
|
raise TypeError(f"'command' must be 'str' not '{type(command)}'")
|
||||||
values = {'file': file, **options}
|
values = {"file": file, **options}
|
||||||
return command.format(values)
|
return command.format(values)
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user