Skip to content

Commit 001482c

Browse files
committed
Address typ issues in build
1 parent cf97b06 commit 001482c

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

crc.py

+5-4
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
import sys
1111
from dataclasses import dataclass
1212
from typing import (
13+
Any,
1314
BinaryIO,
1415
ByteString,
1516
Iterable,
@@ -403,13 +404,13 @@ def verify(
403404

404405

405406
def _bytes_generator(
406-
data: Union[int, ByteString, BinaryIO, Iterable[ByteString]]
407+
data: Union[int, ByteString, BinaryIO, Iterable[ByteString]] # type: ignore
407408
) -> Iterable[bytes]:
408409
if isinstance(data, int):
409410
yield data.to_bytes(1, "big")
410-
elif isinstance(data, ByteString):
411-
yield bytes(data)
412-
elif isinstance(data, (Iterable, BinaryIO)):
411+
elif isinstance(data, ByteString): # type: ignore
412+
yield bytes(data) # type: ignore
413+
elif isinstance(data, (Iterable, BinaryIO)): # type: ignore
413414
yield from (bytes(e) for e in data)
414415
else:
415416
raise TypeError(f"Unsupported parameter type: {type(data)}")

test/unit/test_crc.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
create_lookup_table,
2222
)
2323

24-
Fixture = namedtuple("TestData", "data checksum")
24+
Fixture = namedtuple("Fixture", "data checksum")
2525

2626

2727
class TemplateTest(unittest.TestCase):

0 commit comments

Comments
 (0)