Skip to content

Commit

Permalink
[tests] fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
david-lev committed Jan 11, 2025
1 parent 018e1fc commit 902a639
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ repos:
- id: check-added-large-files

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.8.6
rev: v0.9.1
hooks:
- id: ruff
- id: ruff-format
6 changes: 3 additions & 3 deletions tests/test_async.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,9 +125,9 @@ def test_all_methods_are_overwritten_in_async():
)
if not asyncio.iscoroutinefunction(async_method):
if method_name in non_async:
assert (
sync_method != async_method
), f"Method/attr {method_name} is not overwritten in {async_obj.__name__}"
assert sync_method != async_method, (
f"Method/attr {method_name} is not overwritten in {async_obj.__name__}"
)
continue
raise AssertionError(
f"Method {method_name} is not overwritten in {async_obj.__name__}"
Expand Down
6 changes: 3 additions & 3 deletions tests/test_callback_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ class Group(CallbackData):
id: str
name: str

assert (
User.__callback_id__ != Group.__callback_id__
), "The callback id must be unique for each child class."
assert User.__callback_id__ != Group.__callback_id__, (
"The callback id must be unique for each child class."
)


def test_callback_id_override():
Expand Down
6 changes: 3 additions & 3 deletions tests/test_flows.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@ def test_flows_to_json():
example_dict = json_examples[flow_name]
assert obj_dict["version"] == version.name.replace("_", ".")
assert example_dict["version"] == version.name.replace("_", ".")
assert (
obj_dict == example_dict
), f"Flow {version.name=} {flow_name=} does not match example"
assert obj_dict == example_dict, (
f"Flow {version.name=} {flow_name=} does not match example"
)


def test_min_version():
Expand Down

0 comments on commit 902a639

Please sign in to comment.