mirror of
https://github.com/ethereum/consensus-specs.git
synced 2026-02-02 20:55:05 -05:00
bugfix: typing edge-case: python bool is subclass of int.
This commit is contained in:
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user