From bfdb8221a047e8fc4dd1c438a1db3727667b1d3e Mon Sep 17 00:00:00 2001 From: alcibiade <44736242+alcibiade@users.noreply.github.com> Date: Mon, 5 Nov 2018 21:55:45 +0100 Subject: [PATCH] Remove remaining Python3 explicit typing. The original version of this code is built against Python3.5+ and uses explicit typing. As I think the pyModeS supports Python2, I thought it was preferable top remove these types. --- pyModeS/decoder/fastcrc.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyModeS/decoder/fastcrc.py b/pyModeS/decoder/fastcrc.py index d793d23..d767824 100644 --- a/pyModeS/decoder/fastcrc.py +++ b/pyModeS/decoder/fastcrc.py @@ -9,7 +9,7 @@ class BytesWrapper: self._bytes = [b for b in bytes.fromhex(hex)] - def byte_count(self) -> int: + def byte_count(self): return len(self._bytes) - 3 def get_bit(self, byte_index, bit_index): @@ -30,7 +30,7 @@ class BytesWrapper: return (self._bytes[-3] << 16) | (self._bytes[-2] << 8) | self._bytes[-1] -def crc(msg: str) -> int: +def crc(msg): msgbin = BytesWrapper(msg) for byte_index in range(msgbin.byte_count()):