From 08715661f1900db1ae4aba03aad1aa461de50e5a Mon Sep 17 00:00:00 2001 From: Shreyas Ananthan Date: Fri, 15 Mar 2024 15:55:41 -0600 Subject: [PATCH] Fix type issues --- caelus/post/__init__.py | 5 +++++ caelus/py.typed | 0 caelus/utils/osutils.py | 2 +- 3 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 caelus/py.typed diff --git a/caelus/post/__init__.py b/caelus/post/__init__.py index fb11690..c8e7f4b 100644 --- a/caelus/post/__init__.py +++ b/caelus/post/__init__.py @@ -14,3 +14,8 @@ from .funcobj import PostProcessing from .logs import SolverLog + +__all__ = [ + "PostProcessing", + "SolverLog", +] diff --git a/caelus/py.typed b/caelus/py.typed new file mode 100644 index 0000000..e69de29 diff --git a/caelus/utils/osutils.py b/caelus/utils/osutils.py index 3faab9b..0f0ab57 100644 --- a/caelus/utils/osutils.py +++ b/caelus/utils/osutils.py @@ -246,6 +246,6 @@ def split_path(fname): return (fdir, base, ext) -def path_or_cwd(pdir: Path) -> Path: +def path_or_cwd(pdir: Path | str | None) -> Path: """Sanitize the given path. If None, return current workding directory""" return Path(abspath(str(pdir))) if pdir is not None else Path.cwd()