Skip to content

Commit

Permalink
fix: move comments into if statement
Browse files Browse the repository at this point in the history
  • Loading branch information
zshipko committed Nov 19, 2024
1 parent 59738e2 commit 564b6f4
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions template/plugin/pdk_types.py.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,19 @@ class <%- capitalize(schema.name) %>(Enum):
@dataclass
class <%- capitalize(schema.name) %>(extism.Json):
<% schema.properties.forEach(p => { -%>
<% if (p.description) { -%>
# <%- formatCommentBlock(p.description, "# ") %>
<% } -%>
<% if (!p.nullable || p.required) {%>
<% if (p.description) { -%>
# <%- formatCommentBlock(p.description, "# ") %>
<% } -%>
<%- p.name %>: <%- toPythonType(p) %>
<% } %>
<% }) %>
<% schema.properties.forEach(p => { -%>
<% if (p.description) { -%>
# <%- formatCommentBlock(p.description, "# ") %>
<% } -%>
<% if (p.nullable && !p.required) {%>
<% if (p.description) { -%>
# <%- formatCommentBlock(p.description, "# ") %>
<% } -%>
<%- p.name %>: <%- toPythonType(p) %>
<% } %>
<% }) %>
Expand Down

0 comments on commit 564b6f4

Please sign in to comment.