@aaswe/codebase-ai
Version:
AI-Assisted Software Engineering (AASWE) - Rich codebase context for IDE LLMs
37 lines • 1.89 kB
TypeScript
/**
* Python AST Analyzer
* Implements AST analysis for Python files using Python's ast module via child process
*/
import { BaseAnalyzer } from './BaseAnalyzer';
import { AnalysisContext, ASTNode, CodeFunction, CodeClass, ImportDeclaration, ExportDeclaration, ComplexityMetrics, ParserConfig } from './types';
export declare class PythonAnalyzer extends BaseAnalyzer {
constructor();
protected parseAST(content: string, context: AnalysisContext): Promise<any>;
protected extractNodes(ast: any, context: AnalysisContext): Promise<ASTNode[]>;
protected extractFunctions(ast: any, context: AnalysisContext): Promise<CodeFunction[]>;
protected extractClasses(ast: any, context: AnalysisContext): Promise<CodeClass[]>;
protected extractImports(ast: any, context: AnalysisContext): Promise<ImportDeclaration[]>;
protected extractExports(ast: any, context: AnalysisContext): Promise<ExportDeclaration[]>;
protected extractDependencies(ast: any, _context: AnalysisContext): Promise<string[]>;
protected calculateComplexity(ast: any, _context: AnalysisContext): Promise<ComplexityMetrics>;
protected getParserConfig(): ParserConfig;
private createPythonParserScript;
private getNodeName;
private extractNodeProperties;
private extractPythonParameters;
private extractPythonReturnType;
private extractPythonTypeAnnotation;
private extractPythonDefaultValue;
private calculatePythonFunctionComplexity;
private isPythonExported;
private getPythonVisibility;
private extractPythonFunctionDependencies;
private extractPythonFunctionCalls;
private extractPythonClassProperties;
private extractPythonBaseClasses;
private isPythonAbstractClass;
private isPythonComplexityNode;
private isPythonCognitiveComplexityNode;
private traversePythonNode;
}
//# sourceMappingURL=PythonAnalyzer.d.ts.map