Skip to content

Commit

Permalink
fix ?
Browse files Browse the repository at this point in the history
  • Loading branch information
jeertmans committed Oct 30, 2024
1 parent 09b78c9 commit d9c7e3f
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions manim_slides/convert.py
Original file line number Diff line number Diff line change
Expand Up @@ -396,20 +396,18 @@ def convert_to(self, dest: Path) -> None: # noqa: C901
DEST.
"""
if self.data_uri and not self.offline:
assets_dir = Path("") # Actually we won't care.
assets_dir = None # Actually we won't care.

Check warning on line 399 in manim_slides/convert.py

View check run for this annotation

Codecov / codecov/patch

manim_slides/convert.py#L399

Added line #L399 was not covered by tests
else:
dirname = dest.parent
basename = dest.stem
ext = dest.suffix

assets_dir = Path(
self.assets_dir.format(dirname=dirname, basename=basename, ext=ext)
)
full_assets_dir = dirname / assets_dir

needs_assets = (not self.data_uri) or self.offline
assets_dir = Path(
self.assets_dir.format(dirname=dirname, basename=basename, ext=ext)
)
full_assets_dir = dirname / assets_dir

if needs_assets:
if assets_dir is not None:
logger.debug(f"Assets will be saved to: {full_assets_dir}")
full_assets_dir.mkdir(parents=True, exist_ok=True)

Expand Down Expand Up @@ -443,7 +441,9 @@ def prefix(i: int) -> str:
revealjs_template = Template(self.load_template())

options = self.model_dump()
options["assets_dir"] = assets_dir

if assets_dir is not None:
options["assets_dir"] = assets_dir

has_notes = any(
slide_config.notes != ""
Expand Down

0 comments on commit d9c7e3f

Please sign in to comment.