From 50131e137eeab8572872caa85d7907486ddbcb28 Mon Sep 17 00:00:00 2001 From: jesko Date: Tue, 28 Nov 2023 11:27:03 +0100 Subject: [PATCH] prevent accidental use of non-int typecodes --- refinery/lib/chunks.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/refinery/lib/chunks.py b/refinery/lib/chunks.py index f10ab0fb17..ffabd48e79 100644 --- a/refinery/lib/chunks.py +++ b/refinery/lib/chunks.py @@ -11,9 +11,7 @@ _BIG_ENDIAN = sys.byteorder == 'big' -_TYPE_CODES = { - array.array(t).itemsize: t for t in array.typecodes if t.isupper() -} +_TYPE_CODES = {array.array(t).itemsize: t for t in 'BHILQ'} def unpack(data: bytes, blocksize: int, bigendian: bool = False, step: int = 0) -> Iterable[int]: