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 Jan 1, 2025
1 parent 5f818df commit 964a1a3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions manim/utils/tex_file_writing.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def tex_to_svg_file(
)
svg_file = convert_to_svg(dvi_file, tex_template.output_format)
if not config["no_latex_cleanup"]:
delete_nonsvg_files( jobname = dvi_file.stem )
delete_nonsvg_files(jobname=dvi_file.stem)
return svg_file


Expand Down Expand Up @@ -258,8 +258,7 @@ def convert_to_svg(dvi_file: Path, extension: str, page: int = 1):
return result


def delete_nonsvg_files(additional_endings: Iterable[str] = (),
jobname = None ) -> None:
def delete_nonsvg_files(additional_endings: Iterable[str] = (), jobname=None) -> None:
"""Deletes every file that does not have a suffix in ``(".svg", ".tex", *additional_endings)``
If the optional parameter jobname is specified, only files with stem `jobname` will be deleted,
preserving any nonrelated files.
Expand All @@ -283,6 +282,7 @@ def delete_nonsvg_files(additional_endings: Iterable[str] = (),
if f.stem == jobname and f.suffix not in file_suffix_whitelist:
f.unlink()


def print_all_tex_errors(log_file: Path, tex_compiler: str, tex_file: Path) -> None:
if not log_file.exists():
raise RuntimeError(
Expand Down

0 comments on commit 964a1a3

Please sign in to comment.