Skip to content

Commit

Permalink
Change | to optional
Browse files Browse the repository at this point in the history
  • Loading branch information
mauro committed Jan 22, 2024
1 parent b620979 commit d1c5c6d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion nbs/99_templates.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@
"source": [
"# | exporti\n",
"class TemplateRenderer:\n",
" def render(self, template: str | None = None, **kwargs: Any) -> str:\n",
" def render(self, template: Optional[str] = None, **kwargs: Any) -> str:\n",
" if template is None:\n",
" raise RuntimeError(\"Missing template\")\n",
" return render_to_remove(template, **kwargs)"
Expand Down
2 changes: 1 addition & 1 deletion sal/templates.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def render_to_remove(

# %% ../nbs/99_templates.ipynb 11
class TemplateRenderer:
def render(self, template: str | None = None, **kwargs: Any) -> str:
def render(self, template: Optional[str] = None, **kwargs: Any) -> str:
if template is None:
raise RuntimeError("Missing template")
return render_to_remove(template, **kwargs)
Expand Down

0 comments on commit d1c5c6d

Please sign in to comment.