Remove add_extension_if_not_present

This commit is contained in:
Grant Sanderson 2024-12-11 17:18:29 -06:00
parent 66d949bcb5
commit c9dd2b3cfb
2 changed files with 0 additions and 9 deletions

View file

@ -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

View file

@ -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)