diff --git a/nbs/03_cli.ipynb b/nbs/03_cli.ipynb index f1e1f33..6c98956 100644 --- a/nbs/03_cli.ipynb +++ b/nbs/03_cli.ipynb @@ -55,7 +55,7 @@ "# | export\n", "import click\n", "from pathlib import Path\n", - "from typing import Any\n", + "from typing import Any, Union\n", "from sal.codegen import Sal\n", "from sal.utils import is_notebook" ] @@ -92,7 +92,7 @@ "\n", "# TODO support filters from config file\n", "\n", - "def _render(file: str, directories: list[Path]) -> str | Any:\n", + "def _render(file: str, directories: list[Path]) -> Union[str, Any]:\n", " sal = Sal.from_config(template_directories=directories)\n", " return sal.process_xml_from_filename(file)" ] diff --git a/sal/cli.py b/sal/cli.py index 66c2843..47f3d8a 100644 --- a/sal/cli.py +++ b/sal/cli.py @@ -6,7 +6,7 @@ # %% ../nbs/03_cli.ipynb 4 import click from pathlib import Path -from typing import Any +from typing import Any, Union from .codegen import Sal from .utils import is_notebook @@ -14,7 +14,7 @@ # TODO support filters from config file -def _render(file: str, directories: list[Path]) -> str | Any: +def _render(file: str, directories: list[Path]) -> Union[str, Any]: sal = Sal.from_config(template_directories=directories) return sal.process_xml_from_filename(file)