Fix all flake8 violations across the codebase

CODE STYLE FIXES:
- Fixed line length violations by breaking long lines appropriately
- Removed unused imports (os from installer.py and registry.py)
- Removed unused variables (package_name in _create_pyproject_toml)
- Fixed f-string usage (removed f-strings without placeholders)
- Fixed import organization and removed redundant imports
- Added missing newlines at end of files

SPECIFIC FIXES:
- cli.py: Split long option line, fixed f-string usage, added newline
- installer.py: Removed unused imports/variables, fixed line breaks, improved validation logic
- registry.py: Removed unused import/variable, broke long condition line
- test files: Removed unused imports, fixed long assertion lines, added newlines

All 24 tests still pass and flake8 now reports no violations.
Code is now compliant with PEP 8 style guidelines.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-10-19 08:15:42 +02:00
parent 873120c2d3
commit da6eee7d47
5 changed files with 52 additions and 37 deletions

View File

@@ -1,7 +1,5 @@
"""Tests for agent registry functionality."""
import pytest
from pathlib import Path
from kaizen_agentic.registry import AgentRegistry, AgentDefinition, AgentCategory
@@ -215,21 +213,36 @@ dependencies: ["non-existent-agent"]
def test_agent_category_determination():
"""Test automatic category determination."""
# Test project management category
assert AgentDefinition._determine_category("todo-keeper", "") == AgentCategory.PROJECT_MANAGEMENT
assert AgentDefinition._determine_category("changelog-helper", "") == AgentCategory.PROJECT_MANAGEMENT
result = AgentDefinition._determine_category("todo-keeper", "")
assert result == AgentCategory.PROJECT_MANAGEMENT
result = AgentDefinition._determine_category("changelog-helper", "")
assert result == AgentCategory.PROJECT_MANAGEMENT
# Test testing category
assert AgentDefinition._determine_category("test-runner", "") == AgentCategory.TESTING
assert AgentDefinition._determine_category("tdd-workflow", "") == AgentCategory.TESTING
result = AgentDefinition._determine_category("test-runner", "")
assert result == AgentCategory.TESTING
result = AgentDefinition._determine_category("tdd-workflow", "")
assert result == AgentCategory.TESTING
# Test code quality category
assert AgentDefinition._determine_category("code-refactoring", "") == AgentCategory.CODE_QUALITY
assert AgentDefinition._determine_category("optimization-helper", "") == AgentCategory.CODE_QUALITY
result = AgentDefinition._determine_category("code-refactoring", "")
assert result == AgentCategory.CODE_QUALITY
result = AgentDefinition._determine_category("optimization-helper", "")
assert result == AgentCategory.CODE_QUALITY
# Test documentation category
assert AgentDefinition._determine_category("documentation-generator", "") == AgentCategory.DOCUMENTATION
assert AgentDefinition._determine_category("claude-helper", "") == AgentCategory.DOCUMENTATION
result = AgentDefinition._determine_category("documentation-generator", "")
assert result == AgentCategory.DOCUMENTATION
result = AgentDefinition._determine_category("claude-helper", "")
assert result == AgentCategory.DOCUMENTATION
# Test infrastructure category
assert AgentDefinition._determine_category("setup-repository", "") == AgentCategory.INFRASTRUCTURE
assert AgentDefinition._determine_category("tooling-manager", "") == AgentCategory.INFRASTRUCTURE
result = AgentDefinition._determine_category("setup-repository", "")
assert result == AgentCategory.INFRASTRUCTURE
result = AgentDefinition._determine_category("tooling-manager", "")
assert result == AgentCategory.INFRASTRUCTURE