Skip to content

Commit

Permalink
prevent accidental use of non-int typecodes
Browse files Browse the repository at this point in the history
  • Loading branch information
huettenhain committed Nov 28, 2023
1 parent c861c66 commit 50131e1
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions refinery/lib/chunks.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]:
Expand Down

0 comments on commit 50131e1

Please sign in to comment.