Skip to content

Commit 14a4455

Browse files
author
zach
authored
fix: only wrap nullable fields in Optional[] (#17)
1 parent feb5f05 commit 14a4455

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

src/index.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,7 @@ function toPythonTypeX(type: XtpNormalizedType): string {
6565

6666

6767
function toPythonType(property: XtpTyped): string {
68-
let t = toPythonTypeX(property.xtpType);
69-
if (isOptional(t)) return t;
70-
return `Optional[${t}]`;
68+
return toPythonTypeX(property.xtpType);
7169
}
7270

7371
function toPythonParamType(property: XtpTyped): string {

0 commit comments

Comments
 (0)