generated from john/python-template
style: apply ruff formatting sweep
Co-authored-by: Copilot App <[email protected]>
This commit is contained in:
co-authored by
Copilot App
parent
4aaa9bd581
commit
2a56365847
@@ -129,11 +129,7 @@ def _notifies_negative(tree: ast.Module) -> bool:
|
||||
):
|
||||
continue
|
||||
for keyword in node.keywords:
|
||||
if (
|
||||
keyword.arg == "type"
|
||||
and isinstance(keyword.value, ast.Constant)
|
||||
and keyword.value.value == "negative"
|
||||
):
|
||||
if keyword.arg == "type" and isinstance(keyword.value, ast.Constant) and keyword.value.value == "negative":
|
||||
return True
|
||||
return False
|
||||
|
||||
@@ -149,6 +145,4 @@ def test_no_page_hand_rolls_error_notifications():
|
||||
offenders = sorted(
|
||||
path.stem for path in _page_paths() if _notifies_negative(ast.parse(path.read_text(encoding="utf-8")))
|
||||
)
|
||||
assert offenders == [], (
|
||||
f"Pages must render errors via error_presenter.show_error, not ui.notify: {offenders}"
|
||||
)
|
||||
assert offenders == [], f"Pages must render errors via error_presenter.show_error, not ui.notify: {offenders}"
|
||||
|
||||
Reference in New Issue
Block a user