Skip to content

Commit

Permalink
Insert union
Browse files Browse the repository at this point in the history
  • Loading branch information
mauro committed Jan 22, 2024
1 parent d1c5c6d commit f9204f7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions nbs/03_cli.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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"
]
Expand Down Expand Up @@ -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)"
]
Expand Down
4 changes: 2 additions & 2 deletions sal/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@
# %% ../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

# %% ../nbs/03_cli.ipynb 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)

Expand Down

0 comments on commit f9204f7

Please sign in to comment.