Skip to content

Commit a5cd721

Browse files
author
zach
committed
wip: inner types
1 parent a361d51 commit a5cd721

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

bindgen-test.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ case $1 in
2929
# Using ../../bundle so we test the bindgen template
3030
PLUGIN_NAME=exampleplugin
3131
echo "generating initial plugin code in '$(pwd)/$PLUGIN_NAME'..."
32-
# xtp plugin init --schema-file schema.yaml --template ../../bundle --path $PLUGIN_NAME --name $PLUGIN_NAME --feature stub-with-code-samples
32+
xtp plugin init --schema-file schema.yaml --template ../../bundle --path $PLUGIN_NAME --name $PLUGIN_NAME --feature stub-with-code-samples
3333
echo "building '$PLUGIN_NAME'..."
3434
xtp plugin build --path $PLUGIN_NAME
3535
echo "testing '$PLUGIN_NAME'..."

template/plugin/pdk_types.py.ejs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ class <%- capitalize(schema.name) %>(extism.Json):
2020
<% if (p.description) { -%>
2121
# <%- formatCommentBlock(p.description, "# ") %>
2222
<% } -%>
23-
<%- p.name %>: <%- p.nullable ? `Optional['${toPythonType(p)}']` : `'${toPythonType(p)}'` %>
23+
<%- p.name %>: <%- p.nullable ? `${toPythonType(p)} = None` : `${toPythonType(p)}` %>
2424
<% }) %>
2525
<% } %>
2626
<% }); %>

0 commit comments

Comments
 (0)