Fix linting violations for v1.0.0 release preparation
- Apply black formatting to all Python files - Fix various flake8 violations in agent system code - Clean up imports and whitespace issues 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -3,7 +3,11 @@
|
||||
import json
|
||||
import pytest
|
||||
from pathlib import Path
|
||||
from kaizen_agentic.installer import AgentInstaller, ProjectInitializer, InstallationConfig
|
||||
from kaizen_agentic.installer import (
|
||||
AgentInstaller,
|
||||
ProjectInitializer,
|
||||
InstallationConfig,
|
||||
)
|
||||
from kaizen_agentic.registry import AgentRegistry
|
||||
|
||||
|
||||
@@ -72,9 +76,7 @@ def test_install_agents(test_registry, tmp_path):
|
||||
project_dir = tmp_path / "test_project"
|
||||
|
||||
config = InstallationConfig(
|
||||
target_dir=project_dir,
|
||||
create_backup=False,
|
||||
update_docs=False
|
||||
target_dir=project_dir, create_backup=False, update_docs=False
|
||||
)
|
||||
|
||||
results = installer.install_agents(["base-agent"], config)
|
||||
@@ -89,9 +91,7 @@ def test_install_agents_with_dependencies(test_registry, tmp_path):
|
||||
project_dir = tmp_path / "test_project"
|
||||
|
||||
config = InstallationConfig(
|
||||
target_dir=project_dir,
|
||||
create_backup=False,
|
||||
update_docs=False
|
||||
target_dir=project_dir, create_backup=False, update_docs=False
|
||||
)
|
||||
|
||||
# Install an agent that depends on others
|
||||
@@ -111,7 +111,9 @@ def test_list_installed_agents(test_registry, tmp_path):
|
||||
assert installed == []
|
||||
|
||||
# Install some agents
|
||||
config = InstallationConfig(target_dir=project_dir, create_backup=False, update_docs=False)
|
||||
config = InstallationConfig(
|
||||
target_dir=project_dir, create_backup=False, update_docs=False
|
||||
)
|
||||
installer.install_agents(["base-agent", "keepaTodofile"], config)
|
||||
|
||||
# Check installed agents
|
||||
@@ -127,7 +129,9 @@ def test_update_agents(test_registry, tmp_path):
|
||||
project_dir = tmp_path / "test_project"
|
||||
|
||||
# Install initial agents
|
||||
config = InstallationConfig(target_dir=project_dir, create_backup=False, update_docs=False)
|
||||
config = InstallationConfig(
|
||||
target_dir=project_dir, create_backup=False, update_docs=False
|
||||
)
|
||||
installer.install_agents(["base-agent"], config)
|
||||
|
||||
# Update all agents
|
||||
@@ -146,7 +150,9 @@ def test_remove_agents(test_registry, tmp_path):
|
||||
project_dir = tmp_path / "test_project"
|
||||
|
||||
# Install agents first
|
||||
config = InstallationConfig(target_dir=project_dir, create_backup=False, update_docs=False)
|
||||
config = InstallationConfig(
|
||||
target_dir=project_dir, create_backup=False, update_docs=False
|
||||
)
|
||||
installer.install_agents(["base-agent", "keepaTodofile"], config)
|
||||
|
||||
# Remove an agent
|
||||
@@ -170,7 +176,9 @@ def test_validate_installation(test_registry, tmp_path):
|
||||
assert "No agents directory found" in errors["project"]
|
||||
|
||||
# Install agents and validate
|
||||
config = InstallationConfig(target_dir=project_dir, create_backup=False, update_docs=False)
|
||||
config = InstallationConfig(
|
||||
target_dir=project_dir, create_backup=False, update_docs=False
|
||||
)
|
||||
installer.install_agents(["base-agent"], config)
|
||||
|
||||
errors = installer.validate_installation(project_dir)
|
||||
@@ -187,7 +195,7 @@ def test_update_claude_config(test_registry, tmp_path):
|
||||
target_dir=project_dir,
|
||||
claude_config_path=claude_config,
|
||||
create_backup=False,
|
||||
update_docs=False
|
||||
update_docs=False,
|
||||
)
|
||||
|
||||
installer.install_agents(["base-agent"], config)
|
||||
@@ -208,9 +216,7 @@ def test_project_initializer(test_registry, tmp_path):
|
||||
project_dir = tmp_path / "new_project"
|
||||
|
||||
initializer.init_project(
|
||||
project_dir,
|
||||
template="python-basic",
|
||||
project_name="new_project"
|
||||
project_dir, template="python-basic", project_name="new_project"
|
||||
)
|
||||
|
||||
# Check that project structure was created
|
||||
@@ -236,7 +242,7 @@ def test_project_initializer_custom_agents(test_registry, tmp_path):
|
||||
project_dir,
|
||||
template="python-basic",
|
||||
agent_names=["base-agent", "keepaTodofile"],
|
||||
project_name="custom_project"
|
||||
project_name="custom_project",
|
||||
)
|
||||
|
||||
# Check that specific agents were installed
|
||||
@@ -251,7 +257,7 @@ def test_installation_config():
|
||||
claude_config_path=Path("/tmp/test/claude.json"),
|
||||
makefile_path=Path("/tmp/test/Makefile"),
|
||||
update_docs=True,
|
||||
create_backup=False
|
||||
create_backup=False,
|
||||
)
|
||||
|
||||
assert config.target_dir == Path("/tmp/test")
|
||||
|
||||
Reference in New Issue
Block a user