Skip to content

Commit c9b0a01

Browse files
committed
_compat.py: fix "do not compare types"
1 parent 5db1d2d commit c9b0a01

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/ecdsa/_compat.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ def int_to_bytes(val, length=None, byteorder="big"):
127127
if length is None:
128128
length = byte_length(val)
129129
# for gmpy we need to convert back to native int
130-
if type(val) != int:
130+
if not isinstance(val, int):
131131
val = int(val)
132132
return bytearray(val.to_bytes(length=length, byteorder=byteorder))
133133

0 commit comments

Comments
 (0)