mirror of
https://github.com/SuperClaude-Org/SuperClaude_Framework.git
synced 2025-12-29 16:16:08 +00:00
fix: resolve all ruff linting errors
Fixed 42 linting errors across codebase: - Auto-fixed 35 import sorting issues (I001) - Added unused imports to __all__ in execution/__init__.py - Removed unused variable assignments (F841) - Updated pyproject.toml to use [tool.ruff.lint] section All ruff checks now pass successfully. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -10,8 +10,8 @@ __author__ = "NomenAK, Mithun Gowda B"
|
||||
|
||||
# Expose main components
|
||||
from .pm_agent.confidence import ConfidenceChecker
|
||||
from .pm_agent.self_check import SelfCheckProtocol
|
||||
from .pm_agent.reflexion import ReflexionPattern
|
||||
from .pm_agent.self_check import SelfCheckProtocol
|
||||
|
||||
__all__ = [
|
||||
"ConfidenceChecker",
|
||||
|
||||
@@ -5,8 +5,7 @@ Health check for SuperClaude installation.
|
||||
"""
|
||||
|
||||
from pathlib import Path
|
||||
from typing import Dict, List, Any
|
||||
import sys
|
||||
from typing import Any, Dict
|
||||
|
||||
|
||||
def run_doctor(verbose: bool = False) -> Dict[str, Any]:
|
||||
|
||||
@@ -4,9 +4,9 @@ Command Installation
|
||||
Installs SuperClaude slash commands to ~/.claude/commands/sc/ directory.
|
||||
"""
|
||||
|
||||
import shutil
|
||||
from pathlib import Path
|
||||
from typing import List, Tuple
|
||||
import shutil
|
||||
|
||||
|
||||
def install_commands(
|
||||
|
||||
@@ -4,9 +4,9 @@ Skill Installation Command
|
||||
Installs SuperClaude skills to ~/.claude/skills/ directory.
|
||||
"""
|
||||
|
||||
import shutil
|
||||
from pathlib import Path
|
||||
from typing import List, Optional, Tuple
|
||||
import shutil
|
||||
|
||||
|
||||
def install_skill_command(
|
||||
|
||||
@@ -4,9 +4,10 @@ SuperClaude CLI Main Entry Point
|
||||
Provides command-line interface for SuperClaude operations.
|
||||
"""
|
||||
|
||||
import click
|
||||
from pathlib import Path
|
||||
import sys
|
||||
from pathlib import Path
|
||||
|
||||
import click
|
||||
|
||||
# Add parent directory to path to import superclaude
|
||||
sys.path.insert(0, str(Path(__file__).parent.parent.parent))
|
||||
|
||||
@@ -17,10 +17,11 @@ Usage:
|
||||
"""
|
||||
|
||||
from pathlib import Path
|
||||
from typing import List, Dict, Any, Optional, Callable
|
||||
from .reflection import ReflectionEngine, ConfidenceScore, reflect_before_execution
|
||||
from .parallel import ParallelExecutor, Task, ExecutionPlan, should_parallelize
|
||||
from .self_correction import SelfCorrectionEngine, RootCause, learn_from_failure
|
||||
from typing import Any, Callable, Dict, List, Optional
|
||||
|
||||
from .parallel import ExecutionPlan, ParallelExecutor, Task, should_parallelize
|
||||
from .reflection import ConfidenceScore, ReflectionEngine, reflect_before_execution
|
||||
from .self_correction import RootCause, SelfCorrectionEngine, learn_from_failure
|
||||
|
||||
__all__ = [
|
||||
"intelligent_execute",
|
||||
@@ -30,6 +31,10 @@ __all__ = [
|
||||
"ConfidenceScore",
|
||||
"ExecutionPlan",
|
||||
"RootCause",
|
||||
"Task",
|
||||
"should_parallelize",
|
||||
"reflect_before_execution",
|
||||
"learn_from_failure",
|
||||
]
|
||||
|
||||
|
||||
|
||||
@@ -11,11 +11,11 @@ Key features:
|
||||
- Result aggregation and error handling
|
||||
"""
|
||||
|
||||
from dataclasses import dataclass
|
||||
from typing import List, Dict, Any, Callable, Optional, Set
|
||||
from concurrent.futures import ThreadPoolExecutor, as_completed
|
||||
from enum import Enum
|
||||
import time
|
||||
from concurrent.futures import ThreadPoolExecutor, as_completed
|
||||
from dataclasses import dataclass
|
||||
from enum import Enum
|
||||
from typing import Any, Callable, Dict, List, Optional, Set
|
||||
|
||||
|
||||
class TaskStatus(Enum):
|
||||
@@ -106,9 +106,6 @@ class ParallelExecutor:
|
||||
print(f"⚡ Parallel Executor: Planning {len(tasks)} tasks")
|
||||
print("=" * 60)
|
||||
|
||||
# Build dependency graph
|
||||
task_map = {task.id: task for task in tasks}
|
||||
|
||||
# Find parallel groups using topological sort
|
||||
groups = []
|
||||
completed = set()
|
||||
|
||||
@@ -9,11 +9,11 @@ Implements the "Triple Reflection" pattern:
|
||||
Only proceeds with execution if confidence >70%.
|
||||
"""
|
||||
|
||||
from dataclasses import dataclass
|
||||
from pathlib import Path
|
||||
from typing import List, Optional, Dict, Any
|
||||
import json
|
||||
from dataclasses import dataclass
|
||||
from datetime import datetime
|
||||
from pathlib import Path
|
||||
from typing import Any, Dict, List, Optional
|
||||
|
||||
|
||||
@dataclass
|
||||
|
||||
@@ -12,12 +12,12 @@ Key features:
|
||||
- Persistent learning memory
|
||||
"""
|
||||
|
||||
from dataclasses import dataclass, asdict
|
||||
from typing import List, Optional, Dict, Any
|
||||
from pathlib import Path
|
||||
import json
|
||||
from datetime import datetime
|
||||
import hashlib
|
||||
import json
|
||||
from dataclasses import asdict, dataclass
|
||||
from datetime import datetime
|
||||
from pathlib import Path
|
||||
from typing import Any, Dict, List, Optional
|
||||
|
||||
|
||||
@dataclass
|
||||
@@ -288,7 +288,7 @@ class SelfCorrectionEngine:
|
||||
Updates Reflexion memory with new learning.
|
||||
"""
|
||||
|
||||
print(f"📚 Self-Correction: Learning from failure")
|
||||
print("📚 Self-Correction: Learning from failure")
|
||||
|
||||
# Generate unique ID for this failure
|
||||
failure_id = hashlib.md5(
|
||||
@@ -334,13 +334,13 @@ class SelfCorrectionEngine:
|
||||
if "prevention_rules" not in data:
|
||||
data["prevention_rules"] = []
|
||||
data["prevention_rules"].append(root_cause.prevention_rule)
|
||||
print(f"📝 Prevention rule added")
|
||||
print("📝 Prevention rule added")
|
||||
|
||||
# Save updated memory
|
||||
with open(self.reflexion_file, 'w') as f:
|
||||
json.dump(data, f, indent=2)
|
||||
|
||||
print(f"💾 Reflexion memory updated")
|
||||
print("💾 Reflexion memory updated")
|
||||
|
||||
def get_prevention_rules(self) -> List[str]:
|
||||
"""Get all active prevention rules"""
|
||||
|
||||
@@ -9,8 +9,8 @@ Provides core functionality for PM Agent:
|
||||
"""
|
||||
|
||||
from .confidence import ConfidenceChecker
|
||||
from .self_check import SelfCheckProtocol
|
||||
from .reflexion import ReflexionPattern
|
||||
from .self_check import SelfCheckProtocol
|
||||
|
||||
__all__ = [
|
||||
"ConfidenceChecker",
|
||||
|
||||
@@ -19,8 +19,8 @@ Required Checks:
|
||||
5. Root cause identified with high certainty
|
||||
"""
|
||||
|
||||
from typing import Dict, Any, Optional
|
||||
from pathlib import Path
|
||||
from typing import Any, Dict
|
||||
|
||||
|
||||
class ConfidenceChecker:
|
||||
|
||||
@@ -23,10 +23,10 @@ Process:
|
||||
4. Store for future reference (dual storage)
|
||||
"""
|
||||
|
||||
from typing import Dict, List, Optional, Any
|
||||
from pathlib import Path
|
||||
import json
|
||||
from datetime import datetime
|
||||
from pathlib import Path
|
||||
from typing import Any, Dict, Optional
|
||||
|
||||
|
||||
class ReflexionPattern:
|
||||
|
||||
@@ -13,7 +13,7 @@ The Four Questions:
|
||||
4. Is there evidence?
|
||||
"""
|
||||
|
||||
from typing import Dict, List, Tuple, Any, Optional
|
||||
from typing import Any, Dict, List, Tuple
|
||||
|
||||
|
||||
class SelfCheckProtocol:
|
||||
|
||||
@@ -9,13 +9,12 @@ Entry point registered in pyproject.toml:
|
||||
superclaude = "superclaude.pytest_plugin"
|
||||
"""
|
||||
|
||||
|
||||
import pytest
|
||||
from pathlib import Path
|
||||
from typing import Dict, Any, Optional
|
||||
|
||||
from .pm_agent.confidence import ConfidenceChecker
|
||||
from .pm_agent.self_check import SelfCheckProtocol
|
||||
from .pm_agent.reflexion import ReflexionPattern
|
||||
from .pm_agent.self_check import SelfCheckProtocol
|
||||
from .pm_agent.token_budget import TokenBudgetManager
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user