chore(pre-commit.ci): pre-commit autoupdate (#365)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
pre-commit-ci[bot] 2025-01-13 08:48:02 -10:00 committed by GitHub
parent 0487639ed7
commit e006a1e861
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 18 additions and 22 deletions

View File

@ -38,7 +38,7 @@ repos:
- id: pyupgrade
args: [--py39-plus]
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.8.2
rev: v0.9.1
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]

View File

@ -54,7 +54,7 @@ interface_member = vars(args)["interface.member"].split(".")
if len(interface_member) < 2:
exit_error(
f'Expecting an interface and member separated by a dot: {vars(args)["interface.member"]}'
f"Expecting an interface and member separated by a dot: {vars(args)['interface.member']}"
)
destination = args.dest

View File

@ -129,9 +129,9 @@ def test_unmarshalling_with_table(unmarshall_table):
"flags",
"serial",
]:
assert getattr(unmarshaller.message, attr) == getattr(
message, attr
), f"attr doesnt match: {attr}"
assert getattr(unmarshaller.message, attr) == getattr(message, attr), (
f"attr doesnt match: {attr}"
)
def test_unmarshall_can_resume():
@ -308,7 +308,7 @@ def test_unmarshall_bluez_interfaces_added_message():
"RSSI": -50,
"ServiceData": {
"0000fe95-0000-1000-8000-00805f9b34fb": bytearray(
b"0X\xd6\x03" b"\x026&`" b"4-X\x08"
b"0X\xd6\x03\x026&`4-X\x08"
)
},
"ServicesResolved": False,
@ -417,14 +417,10 @@ def test_unmarshall_bluez_properties_changed_with_service_data():
"RSSI": -63,
"ServiceData": {
"0000fdcd-0000-1000-8000-00805f9b34fb": bytearray(
b"\x08\x12\x1f\xda"
b"`4-X"
b"\x02\x01U\x0f"
b"\x01\xcd\t\x04"
b"\x05\x00\x00\x00"
b"\x08\x12\x1f\xda`4-X\x02\x01U\x0f\x01\xcd\t\x04\x05\x00\x00\x00"
),
"0000fe95-0000-1000-8000-00805f9b34fb": bytearray(
b"0X\x83\n" b"\x02\x1f\xda`" b"4-X\x08"
b"0X\x83\n\x02\x1f\xda`4-X\x08"
),
},
},

View File

@ -20,7 +20,7 @@ async def test_tcp_connection_with_forwarding(event_loop):
addr_zero_options = addr_info[0][1]
if "abstract" in addr_zero_options:
path = f'\0{addr_zero_options["abstract"]}'
path = f"\0{addr_zero_options['abstract']}"
else:
path = addr_zero_options["path"]

View File

@ -66,13 +66,13 @@ def test_interface_name_validator():
]
for name in valid_names:
assert is_interface_name_valid(
name
), f'interface name should be valid: "{name}"'
assert is_interface_name_valid(name), (
f'interface name should be valid: "{name}"'
)
for name in invalid_names:
assert not is_interface_name_valid(
name
), f'interface name should be invalid: "{name}"'
assert not is_interface_name_valid(name), (
f'interface name should be invalid: "{name}"'
)
def test_member_name_validator():
@ -82,6 +82,6 @@ def test_member_name_validator():
for member in valid_members:
assert is_member_name_valid(member), f'member name should be valid: "{member}"'
for member in invalid_members:
assert not is_member_name_valid(
member
), f'member name should be invalid: "{member}"'
assert not is_member_name_valid(member), (
f'member name should be invalid: "{member}"'
)