mirror of
https://github.com/3b1b/manim.git
synced 2025-08-05 16:49:03 +00:00
Remove add_extension_if_not_present
This commit is contained in:
parent
66d949bcb5
commit
c9dd2b3cfb
2 changed files with 0 additions and 9 deletions
|
@ -13,7 +13,6 @@ from pathlib import Path
|
||||||
|
|
||||||
from manimlib.logger import log
|
from manimlib.logger import log
|
||||||
from manimlib.mobject.mobject import Mobject
|
from manimlib.mobject.mobject import Mobject
|
||||||
from manimlib.utils.file_ops import add_extension_if_not_present
|
|
||||||
from manimlib.utils.file_ops import get_sorted_integer_files
|
from manimlib.utils.file_ops import get_sorted_integer_files
|
||||||
from manimlib.utils.file_ops import guarantee_existence
|
from manimlib.utils.file_ops import guarantee_existence
|
||||||
from manimlib.utils.sounds import get_full_sound_file_path
|
from manimlib.utils.sounds import get_full_sound_file_path
|
||||||
|
|
|
@ -17,14 +17,6 @@ if TYPE_CHECKING:
|
||||||
from typing import Iterable
|
from typing import Iterable
|
||||||
|
|
||||||
|
|
||||||
def add_extension_if_not_present(file_name: str, extension: str) -> str:
|
|
||||||
# This could conceivably be smarter about handling existing differing extensions
|
|
||||||
if(file_name[-len(extension):] != extension):
|
|
||||||
return file_name + extension
|
|
||||||
else:
|
|
||||||
return file_name
|
|
||||||
|
|
||||||
|
|
||||||
def guarantee_existence(path: str | Path) -> Path:
|
def guarantee_existence(path: str | Path) -> Path:
|
||||||
path = Path(path)
|
path = Path(path)
|
||||||
path.mkdir(parents=True, exist_ok=True)
|
path.mkdir(parents=True, exist_ok=True)
|
||||||
|
|
Loading…
Add table
Reference in a new issue