Skip to content

Commit

Permalink
Reverted extension extraction to usage of pathlib
Browse files Browse the repository at this point in the history
  • Loading branch information
lorycontixd committed May 16, 2024
1 parent fdc1fec commit 17d5028
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/rod/builder/primitives.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,9 @@ def __post_init__(self) -> None:
"""

if isinstance(self.mesh_path, str):
extension = self.mesh_path.split(".")[-1]
extension = pathlib.Path(self.mesh_path).suffix
elif isinstance(self.mesh_path, pathlib.Path):
extension = str(self.mesh_path).split(".")[-1]
extension = self.mesh_path.suffix
else:
raise TypeError(
f"Expected str or pathlib.Path for mesh_path, got {type(self.mesh_path)}"
Expand Down

0 comments on commit 17d5028

Please sign in to comment.