Skip to content

Commit

Permalink
Fix jinja
Browse files Browse the repository at this point in the history
  • Loading branch information
neNasko1 committed Nov 22, 2024
1 parent c9de7ec commit 3f25d7e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions tools/templates/class.jinja2
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ class _{{ schema.name }}(StandardNode):
{% for input in schema.inputs %}
{{ input.name }}: {%
if is_optional(input)
%}Optional[VarInfo]{%
%}Optional[_VarInfo]{%
elif is_variadic(input)
%}Sequence[VarInfo]{%
%}Sequence[_VarInfo]{%
else
%}VarInfo{%
%}_VarInfo{%
endif %}

{% endfor %}
Expand All @@ -33,11 +33,11 @@ class _{{ schema.name }}(StandardNode):
{% for output in schema.outputs %}
{{ output.name }}: {%
if is_optional(output)
%}Optional[VarInfo]{%
%}Optional[_VarInfo]{%
elif is_variadic(output)
%}Sequence[VarInfo]{%
%}Sequence[_VarInfo]{%
else
%}VarInfo{%
%}_VarInfo{%
endif %}

{% endfor %}
Expand Down
2 changes: 1 addition & 1 deletion tools/templates/preamble.jinja2
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ from typing import cast as typing_cast
import numpy as np
import numpy.typing as npt

from spox._var import Var, VarInfo, result_type, unwrap_vars, get_value
from spox._var import Var, _VarInfo, result_type, unwrap_vars, get_value
from spox._fields import BaseAttributes, BaseInputs, BaseOutputs
from spox._attributes import (
AttrDtype,
Expand Down

0 comments on commit 3f25d7e

Please sign in to comment.