bugfix: typing edge-case: python bool is subclass of int.

This commit is contained in:
protolambda
2019-05-28 00:45:13 +02:00
parent 0e9a047b1d
commit 9e61cc2ed3

View File

@@ -70,7 +70,7 @@ def is_uint_type(typ):
# get the type that the NewType is wrapping
typ = typ.__supertype__
return isinstance(typ, type) and issubclass(typ, int)
return isinstance(typ, type) and issubclass(typ, int) and not issubclass(typ, bool)
def uint_byte_size(typ):