Skip to content

Commit

Permalink
[pre-commit.ci] pre-commit autoupdate (#2039)
Browse files Browse the repository at this point in the history
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Steven Silvester <[email protected]>
  • Loading branch information
pre-commit-ci[bot] and blink1073 authored Sep 5, 2023
1 parent 51c6e0a commit 1420bfb
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 14 deletions.
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ repos:
- id: trailing-whitespace

- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.23.3
rev: 0.26.3
hooks:
- id: check-github-workflows

- repo: https://github.com/executablebooks/mdformat
rev: 0.7.16
rev: 0.7.17
hooks:
- id: mdformat
additional_dependencies:
Expand All @@ -36,7 +36,7 @@ repos:
- id: black

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.0.281
rev: v0.0.287
hooks:
- id: ruff
args: ["--fix"]
6 changes: 3 additions & 3 deletions nbconvert/exporters/pdf.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,9 @@ def run_command( # noqa
if cmd is None:
link = "https://nbconvert.readthedocs.io/en/latest/install.html#installing-tex"
msg = (
"{formatter} not found on PATH, if you have not installed "
"{formatter} you may need to do so. Find further instructions "
"at {link}.".format(formatter=command_list[0], link=link)
f"{command_list[0]} not found on PATH, if you have not installed "
f"{command_list[0]} you may need to do so. Find further instructions "
f"at {link}."
)
raise OSError(msg)

Expand Down
3 changes: 1 addition & 2 deletions nbconvert/filters/datatypefilter.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,7 @@ def __call__(self, output):
if fmt in output:
return [fmt]
warn(
"Your element with mimetype(s) {mimetypes}"
" is not able to be represented.".format(mimetypes=output.keys()),
f"Your element with mimetype(s) {output.keys()} is not able to be represented.",
stacklevel=2,
)

Expand Down
3 changes: 1 addition & 2 deletions nbconvert/filters/widgetsdatatypefilter.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,7 @@ def __call__(self, output):

return [fmt]
warn(
"Your element with mimetype(s) {mimetypes}"
" is not able to be represented.".format(mimetypes=output.keys()),
f"Your element with mimetype(s) {output.keys()} is not able to be represented.",
stacklevel=2,
)

Expand Down
4 changes: 2 additions & 2 deletions nbconvert/preprocessors/extractoutput.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,10 +137,10 @@ def preprocess_cell(self, cell, resources, cell_index): # noqa
"with them. Nbconvert saves these outputs to "
"external files using this filename metadata. "
"Filenames need to be unique across the notebook, "
"or images will be overwritten. The filename {} is "
f"or images will be overwritten. The filename {filename} is "
"associated with more than one output. The second "
"output associated with this filename is in cell "
"{}.".format(filename, cell_index)
f"{cell_index}."
)
raise ValueError(msg)
# In the resources, make the figure available via
Expand Down
2 changes: 1 addition & 1 deletion nbconvert/tests/test_nbconvertapp.py
Original file line number Diff line number Diff line change
Expand Up @@ -527,7 +527,7 @@ def fig_exists(path):
path = os.path.join(output_dir.name, "files")
self.nbconvert(
"--log-level 0 notebook4_jpeg.ipynb --to rst "
"--NbConvertApp.output_files_dir={}".format(path)
f"--NbConvertApp.output_files_dir={path}"
)
assert fig_exists(path)
output_dir.cleanup()
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ dependencies = [
"black[jupyter]==23.3.0",
"mdformat>0.7",
"mdformat-gfm>=0.3.5",
"ruff==0.0.281"
"ruff==0.0.287"
]
detached = true
[tool.hatch.envs.lint.scripts]
Expand Down

0 comments on commit 1420bfb

Please sign in to comment.