Skip to content

Commit 2abe141

Browse files
[pre-commit.ci] pre-commit autoupdate (#756)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Robert Resch <[email protected]>
1 parent 76bdfee commit 2abe141

File tree

4 files changed

+6
-7
lines changed

4 files changed

+6
-7
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ default_language_version:
1111

1212
repos:
1313
- repo: https://github.com/astral-sh/ruff-pre-commit
14-
rev: v0.8.6
14+
rev: v0.9.1
1515
hooks:
1616
- id: ruff
1717
args:

deebot_client/messages/__init__.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,7 @@ def get_message(message_name: str, data_type: DataType) -> type[Message] | None:
6262

6363
converted_name = message_name
6464
# T8 series and newer
65-
if converted_name.endswith("_V2"):
66-
converted_name = converted_name[:-3]
65+
converted_name = converted_name.removesuffix("_V2")
6766

6867
if message_type := messages.get(converted_name, None):
6968
return message_type

tests/commands/json/test_charge.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,5 +46,5 @@ async def test_Charge_failed(caplog: pytest.LogCaptureFixture) -> None:
4646
assert (
4747
"deebot_client.commands.json.common",
4848
logging.WARNING,
49-
f'Command "charge" was not successfully. body={json['resp']['body']}',
49+
f'Command "charge" was not successfully. body={json["resp"]["body"]}',
5050
) in caplog.record_tuples

tests/hardware/test_init.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -248,9 +248,9 @@ async def test_capabilities_event_extraction(
248248
capabilities = info.capabilities
249249
assert capabilities._events.keys() == expected.keys()
250250
for event, expected_commands in expected.items():
251-
assert (
252-
capabilities.get_refresh_commands(event) == expected_commands
253-
), f"Refresh commands doesn't match for {event}"
251+
assert capabilities.get_refresh_commands(event) == expected_commands, (
252+
f"Refresh commands doesn't match for {event}"
253+
)
254254

255255

256256
def test_all_models_loaded() -> None:

0 commit comments

Comments
 (0)