Skip to content

Commit 7c1fc44

Browse files
committed
correct type annotations
1 parent 8a579f7 commit 7c1fc44

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/sme_contrib/plot.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ def facet_grid_3D(
196196

197197

198198
def facet_grid_animate_3D(
199-
filename: str | Path,
199+
filename: Unioin[str, Path],
200200
data: list[dict[str, np.ndarray]],
201201
plotfuncs: dict[str, Callable],
202202
show_cmap: bool = False,
@@ -361,7 +361,7 @@ def plotfunc(
361361

362362

363363
def concentrationsAnimate3D(
364-
filename: str | Path,
364+
filename: Union[str, Path],
365365
simulation_results: sme.SimulationResultList,
366366
species: list[str],
367367
show_cmap: bool = False,
@@ -371,14 +371,14 @@ def concentrationsAnimate3D(
371371
linked_views: bool = True,
372372
plotter_kwargs: dict[str, Any] = None,
373373
plotfunc_kwargs: dict[str, Any] = None,
374-
) -> str | Path:
374+
) -> Union[str, Path]:
375375
"""Animate a list of frames from a simulation result list.
376376
This function creates a 3D animation of the species concentrations over time. Each frame will be a 3D plot of the concentration of a single species.
377377
This function is a wrapper around the facet_grid_animate_3D function.
378378
The animation will be saved to the specified filename.
379379
380380
Args:
381-
filename (str | Path): filename to save the animation to. Uses mp4 format.
381+
filename (Unioin[str, Path]): filename to save the animation to. Uses mp4 format.
382382
simulation_results (sme.SimulationResultList): a list of `SimulationResult` objects, i.e., a list of recorded frames of the simulations
383383
species (list[str]): list of species to plot
384384
show_cmap (bool, optional): Whether to show the colorbar on theplots or not. Defaults to False.
@@ -390,7 +390,7 @@ def concentrationsAnimate3D(
390390
plotfunc_kwargs (dict[str, Any], optional): Additional keyword arguments passed to plotter.add_mesh. Defaults to None. See [here](https://docs.pyvista.org/api/plotting/_autosummary/pyvista.plotter.add_mesh#) for more information.
391391
392392
Returns:
393-
str | Path: path to the saved animation .mp4 file
393+
Unioin[str, Path]: path to the saved animation .mp4 file
394394
"""
395395

396396
def plotfunc(

0 commit comments

Comments
 (0)