Skip to content

Commit f266946

Browse files
stranmaclaude
andcommitted
style: reformat test files for ruff 0.15.6 compatibility
Local ruff 0.8.6 formatted differently than CI's ruff 0.15.6. Reformatted with 0.15.6 to match CI expectations. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent d201cf0 commit f266946

4 files changed

Lines changed: 21 additions & 21 deletions

File tree

tests/test_agents.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -102,9 +102,9 @@ def test_agent_has_tools(self, agent_name: str, agent_frontmatter: dict[str, dic
102102
def test_agent_has_permission_mode(self, agent_name: str, agent_frontmatter: dict[str, dict[str, str]]) -> None:
103103
fm = agent_frontmatter.get(agent_name, {})
104104
assert "permissionMode" in fm, f"{agent_name} missing 'permissionMode' in frontmatter"
105-
assert (
106-
fm["permissionMode"] in VALID_PERMISSION_MODES
107-
), f"{agent_name} has invalid permissionMode: {fm['permissionMode']!r}"
105+
assert fm["permissionMode"] in VALID_PERMISSION_MODES, (
106+
f"{agent_name} has invalid permissionMode: {fm['permissionMode']!r}"
107+
)
108108

109109

110110
class TestAgentBody:

tests/test_commands.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@ class TestCommandsRemoved:
99
"""Verify commands directory was removed (all commands pruned)."""
1010

1111
def test_commands_directory_does_not_exist(self) -> None:
12-
assert (
13-
not COMMANDS_DIR.exists()
14-
), f"Commands directory should not exist after pruning, but found: {COMMANDS_DIR}"
12+
assert not COMMANDS_DIR.exists(), (
13+
f"Commands directory should not exist after pruning, but found: {COMMANDS_DIR}"
14+
)

tests/test_hooks.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,9 @@ def test_hook_is_executable(self, hook_name: str) -> None:
4848
cwd=repo_root,
4949
)
5050
if result.stdout:
51-
assert result.stdout.startswith(
52-
"100755"
53-
), f"{hook_name} is not tracked as executable by git (expected mode 100755)"
51+
assert result.stdout.startswith("100755"), (
52+
f"{hook_name} is not tracked as executable by git (expected mode 100755)"
53+
)
5454
else:
5555
# Not in a git repo (e.g. integration test copy) -- fall back to filesystem
5656
mode = hook_path.stat().st_mode
@@ -141,9 +141,9 @@ def test_does_not_block_local_destruction(self) -> None:
141141
non_comment_lines = [line for line in content.splitlines() if not line.strip().startswith("#")]
142142
code_content = "\n".join(non_comment_lines)
143143
for pattern in ["rm -rf /", "'sudo'", "DROP DATABASE", "git push --force"]:
144-
assert (
145-
pattern not in code_content
146-
), f"dangerous-actions-blocker should NOT block local destruction pattern: {pattern}"
144+
assert pattern not in code_content, (
145+
f"dangerous-actions-blocker should NOT block local destruction pattern: {pattern}"
146+
)
147147

148148
def test_has_security_model_comment(self) -> None:
149149
content = (HOOKS_DIR / "dangerous-actions-blocker.sh").read_text(encoding="utf-8")

tests/test_skills.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -91,17 +91,17 @@ def test_side_effect_skills_disable_model_invocation(self, skill_name: str) -> N
9191
content = (SKILLS_DIR / skill_name / "SKILL.md").read_text(encoding="utf-8")
9292
parts = content.split("---", 2)
9393
frontmatter = parts[1] if len(parts) >= 3 else ""
94-
assert (
95-
"disable-model-invocation: true" in frontmatter
96-
), f"{skill_name} should have disable-model-invocation: true (has side effects)"
94+
assert "disable-model-invocation: true" in frontmatter, (
95+
f"{skill_name} should have disable-model-invocation: true (has side effects)"
96+
)
9797

9898
def test_design_allows_model_invocation(self) -> None:
9999
content = (SKILLS_DIR / "design" / "SKILL.md").read_text(encoding="utf-8")
100100
parts = content.split("---", 2)
101101
frontmatter = parts[1] if len(parts) >= 3 else ""
102-
assert (
103-
"disable-model-invocation" not in frontmatter
104-
), "design should NOT have disable-model-invocation (intentionally model-invocable)"
102+
assert "disable-model-invocation" not in frontmatter, (
103+
"design should NOT have disable-model-invocation (intentionally model-invocable)"
104+
)
105105

106106

107107
class TestSkillContent:
@@ -131,9 +131,9 @@ def test_design_reads_implementation_plan(self) -> None:
131131

132132
def test_design_classifies_scope(self) -> None:
133133
content = (SKILLS_DIR / "design" / "SKILL.md").read_text(encoding="utf-8")
134-
assert (
135-
"**Q** (Quick)" in content and "**S** (Standard)" in content and "**P** (Project)" in content
136-
), "design should classify scope as Q/S/P with descriptive labels"
134+
assert "**Q** (Quick)" in content and "**S** (Standard)" in content and "**P** (Project)" in content, (
135+
"design should classify scope as Q/S/P with descriptive labels"
136+
)
137137

138138
def test_design_has_argument_hint(self) -> None:
139139
content = (SKILLS_DIR / "design" / "SKILL.md").read_text(encoding="utf-8")

0 commit comments

Comments
 (0)