From b4b4ff79484740417c59249d148ac1e6d29be1f0 Mon Sep 17 00:00:00 2001 From: Christina Cai Date: Sat, 15 Apr 2023 15:49:16 -0400 Subject: [PATCH] added Pathlike to wwinp_to_wws --- openmc/weight_windows.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/openmc/weight_windows.py b/openmc/weight_windows.py index 29b92a7ab4..fa384f7cc1 100644 --- a/openmc/weight_windows.py +++ b/openmc/weight_windows.py @@ -1,6 +1,7 @@ from __future__ import annotations from collections.abc import Iterable from numbers import Real, Integral +import typing from typing import Iterable, List, Optional, Union, Dict import pathlib @@ -11,6 +12,7 @@ import h5py from openmc.filter import _PARTICLES from openmc.mesh import MeshBase, RectilinearMesh, UnstructuredMesh import openmc.checkvalue as cv +from openmc.checkvalue import PathLike from ._xml import get_text from .mixin import IDManagerMixin @@ -449,7 +451,7 @@ class WeightWindows(IDManagerMixin): ) -def wwinp_to_wws(path: Union[str, pathlib.Path]) -> List[WeightWindows]: +def wwinp_to_wws(path: PathLike) -> List[WeightWindows]: """Create WeightWindows instances from a wwinp file .. versionadded:: 0.13.1