[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 {
|
||||
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"
|
||||
|
|
Loading…
Reference in a new issue