diff --git a/pkg/codegen/python/gen.go b/pkg/codegen/python/gen.go index 6dc7185dc..d656bda70 100644 --- a/pkg/codegen/python/gen.go +++ b/pkg/codegen/python/gen.go @@ -1521,7 +1521,9 @@ func (mod *modContext) typeString(t schema.Type, input, wrapInput, optional, acc switch t { case schema.BoolType: typ = "bool" - case schema.IntType, schema.NumberType: + case schema.IntType: + typ = "int" + case schema.NumberType: typ = "float" case schema.StringType: typ = "str" @@ -1562,7 +1564,9 @@ func pyType(typ schema.Type) string { switch typ { case schema.BoolType: return "bool" - case schema.IntType, schema.NumberType: + case schema.IntType: + return "int" + case schema.NumberType: return "float" case schema.StringType: return "str"