style: format with black and fix ruff SIM117 warnings

- Merge nested with statements in test_project_root.py
- Reformat multi-line calls in test_cli.py and update.py
This commit is contained in:
Zhengshou Lai
2026-05-27 11:23:13 +08:00
parent 7c5fa8ae24
commit 480ee311f2
3 changed files with 30 additions and 19 deletions
+4 -2
View File
@@ -31,7 +31,10 @@ class TestCliHelp:
runner = CliRunner()
result = runner.invoke(cli, ["update", "--help"])
assert result.exit_code == 0
assert "update" in result.output.lower() or "reinstall" in result.output.lower()
assert (
"update" in result.output.lower()
or "reinstall" in result.output.lower()
)
def test_upgrade_alias_exists(self) -> None:
"""upgrade should be an alias for update."""
@@ -96,4 +99,3 @@ class TestCliDefaultBehavior:
assert result.exit_code == 0
call_args = mock_run.call_args[0][0]
assert "--dangerously-skip-permissions" in call_args