[codege/python] Use int
as the type annotation for integers (#5309)
This commit is contained in:
parent
4dd40e4490
commit
5e06da464a
|
@ -1521,7 +1521,9 @@ func (mod *modContext) typeString(t schema.Type, input, wrapInput, optional, acc
|
||||||
switch t {
|
switch t {
|
||||||
case schema.BoolType:
|
case schema.BoolType:
|
||||||
typ = "bool"
|
typ = "bool"
|
||||||
case schema.IntType, schema.NumberType:
|
case schema.IntType:
|
||||||
|
typ = "int"
|
||||||
|
case schema.NumberType:
|
||||||
typ = "float"
|
typ = "float"
|
||||||
case schema.StringType:
|
case schema.StringType:
|
||||||
typ = "str"
|
typ = "str"
|
||||||
|
@ -1562,7 +1564,9 @@ func pyType(typ schema.Type) string {
|
||||||
switch typ {
|
switch typ {
|
||||||
case schema.BoolType:
|
case schema.BoolType:
|
||||||
return "bool"
|
return "bool"
|
||||||
case schema.IntType, schema.NumberType:
|
case schema.IntType:
|
||||||
|
return "int"
|
||||||
|
case schema.NumberType:
|
||||||
return "float"
|
return "float"
|
||||||
case schema.StringType:
|
case schema.StringType:
|
||||||
return "str"
|
return "str"
|
||||||
|
|
Loading…
Reference in a new issue