kicad-mcp/kicad_mcp/utils/temp_dir_manager.py
Ryan Malloy 995dfd57c1 Add comprehensive advanced KiCad features and fix MCP compatibility issues
- Implement 3D model analysis and mechanical constraints checking
- Add advanced DRC rule customization for HDI, RF, and automotive applications
- Create symbol library management with analysis and validation tools
- Implement PCB layer stack-up analysis with impedance calculations
- Fix Context parameter validation errors causing client failures
- Add enhanced tool annotations with examples for better LLM compatibility
- Include comprehensive test coverage improvements (22.21% coverage)
- Add CLAUDE.md documentation for development guidance

New Advanced Tools:
• 3D model analysis: analyze_3d_models, check_mechanical_constraints
• Advanced DRC: create_drc_rule_set, analyze_pcb_drc_violations
• Symbol management: analyze_symbol_library, validate_symbol_library
• Layer analysis: analyze_pcb_stackup, calculate_trace_impedance

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-11 15:57:46 -06:00

28 lines
566 B
Python

"""
Utility for managing temporary directories.
"""
from typing import List
# List of temporary directories to clean up
_temp_dirs: List[str] = []
def register_temp_dir(temp_dir: str) -> None:
"""Register a temporary directory for cleanup.
Args:
temp_dir: Path to the temporary directory
"""
if temp_dir not in _temp_dirs:
_temp_dirs.append(temp_dir)
def get_temp_dirs() -> List[str]:
"""Get all registered temporary directories.
Returns:
List of temporary directory paths
"""
return _temp_dirs.copy()