Skip to content

Commit 3cc9a5f

Browse files
committed
fix f-strings, release v0.2
1 parent d67abac commit 3cc9a5f

File tree

7 files changed

+7
-7
lines changed

7 files changed

+7
-7
lines changed

okdmr/dmrlib/etsi/crc/crc.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ def __init__(self, configuration: Union[BitCrcConfiguration, enum.Enum]):
102102
configuration = configuration.value
103103
assert isinstance(
104104
configuration, BitCrcConfiguration
105-
), f"BitCrcConfiguration not provided, got ${type(configuration)} instead"
105+
), f"BitCrcConfiguration not provided, got {type(configuration)} instead"
106106
self._topbit: bitarray = bitarray([1]) + bitarray(
107107
[0] * (configuration.width_bits - 1)
108108
)

okdmr/dmrlib/etsi/crc/crc16.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ def check(data: bytes, crc16: int, mask: CrcMasks) -> bool:
2626
"""
2727
assert (
2828
0x0000 <= crc16 <= 0xFFFF
29-
), f"CRC16 is expected in range (exclusive) 0-${0xFFFF}, got ${crc16}"
29+
), f"CRC16 is expected in range (exclusive) 0-{0xFFFF}, got {crc16}"
3030

3131
return CRC16.calculate(data, mask) == crc16
3232

okdmr/dmrlib/etsi/crc/crc32.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ def check(data: bytes, crc32: int) -> bool:
2424
"""
2525
assert (
2626
0x00000000 <= crc32 <= 0xFFFFFFFF
27-
), f"CRC32 is expected in range (exclusive) 0-4294967295, got ${crc32}"
27+
), f"CRC32 is expected in range (exclusive) 0-{0xFFFFFFFF}, got {crc32}"
2828

2929
return CRC32.calculate(data) == crc32
3030

okdmr/tests/dmrlib/etsi/crc/test_crc16.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,4 @@ def test_crc16():
2020
data=bytes.fromhex(databytes),
2121
crc16=int.from_bytes(bytes.fromhex(crc32), byteorder="big"),
2222
mask=crc_mask,
23-
), f"CRC16 does not match in ${(databytes, crc32, crc_mask)}"
23+
), f"CRC16 does not match in {(databytes, crc32, crc_mask)}"

okdmr/tests/dmrlib/etsi/crc/test_crc32.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,4 @@ def test_crc32():
1818
assert CRC32.check(
1919
data=bytes.fromhex(databytes),
2020
crc32=int.from_bytes(bytes.fromhex(expected_crc32), byteorder="little"),
21-
), f"CRC32 does not match in ${(databytes, expected_crc32)}"
21+
), f"CRC32 does not match in {(databytes, expected_crc32)}"

okdmr/tests/dmrlib/etsi/crc/test_crc9.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ def test_crc9():
4444
serial_number=serialno,
4545
crc9=expected_crc9,
4646
crc32=bytes.fromhex(crc32) if crc32 else None,
47-
), f"CRC9 does not match in ${(databytes, serialno, expected_crc9, mask, crc32)}"
47+
), f"CRC9 does not match in {(databytes, serialno, expected_crc9, mask, crc32)}"
4848

4949

5050
def test_crc9_table():

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
author="Marek Sebera",
1818
author_email="marek.sebera@gmail.com",
1919
license="AGPL-3.0",
20-
version="0.1",
20+
version="0.2",
2121
packages=[
2222
"okdmr.dmrlib",
2323
"okdmr.dmrlib.transmission",

0 commit comments

Comments
 (0)