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] committed Sep 27, 2022
1 parent b674959 commit c2f3ea3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 2 additions & 1 deletion sphinx_toolbox/assets.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,8 @@ def visit_asset_node(translator: HTMLTranslator, node: AssetNode) -> None:

source_file = PathPlus(translator.builder.confdir) / node["source_file"]

if source_file not in translator._asset_node_seen_files and source_file.is_file(): # type: ignore[attr-defined]
if source_file not in translator._asset_node_seen_files and source_file.is_file(
): # type: ignore[attr-defined]
# Avoid unnecessary copies of potentially large files.
translator._asset_node_seen_files.append(source_file) # type: ignore[attr-defined]
shutil.copy2(source_file, assets_out_dir)
Expand Down
2 changes: 0 additions & 2 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,12 +158,10 @@ def depart_figure(self, node: docutils.nodes.figure) -> None:

# original_run = PyModule.run


# def patched_run(self) -> List[docutils.nodes.Node]:
# ret: List[docutils.nodes.Node] = original_run(self)
# if ret and isinstance(ret[-2], docutils.nodes.target):
# ret = [ret[-2], ret[-1], *ret[:-2]]
# return ret


# PyModule.run = patched_run

0 comments on commit c2f3ea3

Please sign in to comment.