Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] authored and tuncbkose committed Apr 26, 2023
1 parent bcf45c5 commit 050ee44
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
4 changes: 1 addition & 3 deletions nbconvert/nbconvertapp.py
Original file line number Diff line number Diff line change
Expand Up @@ -420,9 +420,7 @@ def _notebook_filename_to_name(self, notebook_filename):
"""
basename = os.path.basename(notebook_filename)
notebook_name = basename[: basename.rfind(".")]
notebook_name = self.output_base.format(
notebook_name=notebook_name
)
notebook_name = self.output_base.format(notebook_name=notebook_name)

return notebook_name

Expand Down
3 changes: 1 addition & 2 deletions nbconvert/tests/test_nbconvertapp.py
Original file line number Diff line number Diff line change
Expand Up @@ -654,7 +654,6 @@ def test_output_base(self):
for nbn in notebook_names:
assert os.path.isfile(f"{nbn}.md")


# Test single output with static output name
nbname = notebook_names[0]
with self.create_temp_cwd([nbname + ".ipynb"]):
Expand Down Expand Up @@ -682,4 +681,4 @@ def test_same_filename_different_dir(self):
self.copy_files_to(["notebook1.ipynb"], temp_wd + "/dir2")
self.nbconvert("dir1/notebook1.ipynb dir2/notebook1.ipynb --to markdown")
assert os.path.isfile("dir1/notebook1.md")
assert os.path.isfile("dir2/notebook1.md")
assert os.path.isfile("dir2/notebook1.md")

0 comments on commit 050ee44

Please sign in to comment.