From 9e61cc2ed3124c2118b820543f5424d680153854 Mon Sep 17 00:00:00 2001 From: protolambda Date: Tue, 28 May 2019 00:45:13 +0200 Subject: [PATCH] bugfix: typing edge-case: python bool is subclass of int. --- test_libs/pyspec/eth2spec/utils/ssz/ssz_typing.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test_libs/pyspec/eth2spec/utils/ssz/ssz_typing.py b/test_libs/pyspec/eth2spec/utils/ssz/ssz_typing.py index 0121ded9e..326dcb748 100644 --- a/test_libs/pyspec/eth2spec/utils/ssz/ssz_typing.py +++ b/test_libs/pyspec/eth2spec/utils/ssz/ssz_typing.py @@ -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):