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.
This commit is contained in:
alcibiade 2018-11-05 21:55:45 +01:00 committed by GitHub
parent 32e6ee3904
commit bfdb8221a0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -9,7 +9,7 @@ class BytesWrapper:
self._bytes = [b for b in bytes.fromhex(hex)] self._bytes = [b for b in bytes.fromhex(hex)]
def byte_count(self) -> int: def byte_count(self):
return len(self._bytes) - 3 return len(self._bytes) - 3
def get_bit(self, byte_index, bit_index): 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] return (self._bytes[-3] << 16) | (self._bytes[-2] << 8) | self._bytes[-1]
def crc(msg: str) -> int: def crc(msg):
msgbin = BytesWrapper(msg) msgbin = BytesWrapper(msg)
for byte_index in range(msgbin.byte_count()): for byte_index in range(msgbin.byte_count()):