[pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci
This commit is contained in:
pre-commit-ci[bot] 2021-11-19 08:54:41 +00:00
parent 7845b6a459
commit 4e406389cf

View File

@ -258,6 +258,7 @@ except ImportError:
else:
register(IPythonViewer)
class CommandViewer(Viewer):
"""
The viewer that use commands.
@ -271,11 +272,13 @@ class CommandViewer(Viewer):
"""
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"]
if not isinstance(command, str):
raise TypeError(f"'command' must be 'str' not '{type(command)}'")
values = {'file': file, **options}
values = {"file": file, **options}
return command.format(values)