# sec_interp.analyze_project_optfixed module

analyze_project_opt2.py - Analiza estructura del proyecto para IA Versión optimizada con mejoras de rendimiento y funcionalidad

exception sec_interp.analyze_project_optfixed.TimeoutException

  Bases: `Exception`

  Excepción para timeouts

exception sec_interp.analyze_project_optfixed.AnalysisError

  Bases: `Exception`

  Excepción base para errores de análisis

sec_interp.analyze_project_optfixed.timeout(seconds: int)

  Context manager para timeout de operaciones

class sec_interp.analyze_project_optfixed.LRUCache(maxsize: int = 256)

  Bases: `object`

  Cache LRU más eficiente que lru_cache para grandes volúmenes

  get(key: str) → Any

    Obtener valor del cache

  set(key: str, value: Any) → None

    Establecer valor en cache

  clear() → None

    Limpiar cache

  stats() → Dict[str, Any]

    Obtener estadísticas del cache

class sec_interp.analyze_project_optfixed.ProgressTracker(total_files: int)

  Bases: `object`

  Tracker de progreso con estadísticas en tiempo real

  update(file_path: Path, processing_time: float) → None

    Actualizar progreso

  complete() → Dict[str, Any]

    Completar tracker y retornar estadísticas

class sec_interp.analyze_project_optfixed.ModuleAnalysis(name: str, lines: int, functions: List[str], classes: List[str], imports: List[str], complexity_score: float, dependencies: List[str], todo_comments: List[str])

  Bases: `object`

  Análisis de un módulo Python

  name: str
  lines: int
  functions: List[str]
  classes: List[str]
  imports: List[str]
  complexity_score: float
  dependencies: List[str]
  todo_comments: List[str]

class sec_interp.analyze_project_optfixed.ProjectContext(project_name: str, structure: Dict[str, Any], entry_points: List[str], tech_stack: Dict[str, List[str]], patterns: Dict[str, Any], technical_debt: List[str], optimization_opportunities: List[str], security_issues: List[str])

  Bases: `object`

  Contexto completo del proyecto

  project_name: str
  structure: Dict[str, Any]
  entry_points: List[str]
  tech_stack: Dict[str, List[str]]
  patterns: Dict[str, Any]
  technical_debt: List[str]
  optimization_opportunities: List[str]
  security_issues: List[str]

class sec_interp.analyze_project_optfixed.ProjectAnalyzer(project_path: str, max_workers: int = None, exclude_patterns: List[str] = None)

  Bases: `object`

  DEFAULT_CONFIG = {'qgis_weights': {'mandatory_files': 5, 'metadata_valid': 4, 'qgis_widget_usage': 2, 'spatial_index_usage': 3, 'ui_logic_separation': 4}, 'quality_weights': {'complexity_high': 1, 'complexity_low': 3, 'complexity_medium': 2, 'docstrings': 3, 'has_main': 1, 'no_syntax_error': 1, 'size_medium': 1, 'size_small': 2}, 'thresholds': {'complexity_high': 15, 'complexity_low': 5, 'complexity_medium': 10, 'size_medium': 400, 'size_small': 200}}
  analyze() → Dict[str, Any]

    Ejecuta análisis completo optimizado

sec_interp.analyze_project_optfixed.setup_logging(verbose: bool = False)

  Configura el sistema de logging

sec_interp.analyze_project_optfixed.main()

  Función principal optimizada