diff --git a/python/cql2.pyi b/python/cql2.pyi index 00db301..359814b 100644 --- a/python/cql2.pyi +++ b/python/cql2.pyi @@ -12,11 +12,11 @@ class SqlQuery: class Expr: @staticmethod - def from_path(path: PathLike) -> Expr: + def from_path(path: PathLike | str) -> Expr: """Reads CQL2 from a filesystem path. Args: - path (PathLike): The input path + path (PathLike | str): The input path Returns: Expr: The CQL2 expression diff --git a/python/tests/test_expr.py b/python/tests/test_expr.py index 7f4a073..671533e 100644 --- a/python/tests/test_expr.py +++ b/python/tests/test_expr.py @@ -7,6 +7,10 @@ def test_from_path(fixtures: Path) -> None: Expr.from_path(fixtures / "text" / "example01.txt") +def test_from_path_str(fixtures: Path) -> None: + Expr.from_path(str(fixtures / "text" / "example01.txt")) + + def test_init(example01_text: str) -> None: Expr(example01_text)