Skip to content

Commit d9b45db

Browse files
committed
fix: indent codeSamples line by line instead of just start of sample
1 parent 475a678 commit d9b45db

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

template/plugin/plugin.py.ejs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@ from typing import List, Optional # noqa: F401
1616
<% } -%>
1717
def <%- pythonFunctionName(ex.name) %>(<% if (ex.input) { %>input: <%- toPythonParamType(ex.input) %> <% } %>) <% if (ex.output) {%>-> <%- toPythonParamType(ex.output) %><%}%>:
1818
<% if (featureFlags['stub-with-code-samples'] && codeSamples(ex, 'python').length > 0) { -%>
19-
<%- codeSamples(ex, 'python')[0].source %>
19+
<% for (const line of codeSamples(ex, 'python')[0].source.split("\n")) { -%>
20+
<%- line %>
21+
<% } -%>
2022
<% } else { -%>
2123
raise Exception("Unimplemented: <%- ex.name %>")
2224
<% } -%>

0 commit comments

Comments
 (0)