From c3ec572b67804c14f0af5228407bb4985fe04ab4 Mon Sep 17 00:00:00 2001 From: Pavol Rusnak Date: Thu, 21 Nov 2024 13:33:58 +0100 Subject: [PATCH] do not use is for int comparison --- hid.pyx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hid.pyx b/hid.pyx index cb05e72..ea93696 100644 --- a/hid.pyx +++ b/hid.pyx @@ -231,7 +231,7 @@ cdef class device: else: with nogil: n = hid_read(c_hid, cbuff, c_max_length) - if n is -1: + if n == -1: raise IOError('read error') res = list(cbuff[:n]) finally: