diff --git a/ruff.toml b/ruff.toml index e09412e..9a7f988 100755 --- a/ruff.toml +++ b/ruff.toml @@ -32,6 +32,7 @@ exclude = [ "venv", "typings", "tests/fixtures/malformed.py", + "tests/fixtures/sample_type_aliases.py", ] extend-include = ["*.ipynb"] fix = true diff --git a/src/exportify/analysis/ast_parser.py b/src/exportify/analysis/ast_parser.py index a91a1cd..07c7f84 100644 --- a/src/exportify/analysis/ast_parser.py +++ b/src/exportify/analysis/ast_parser.py @@ -67,8 +67,8 @@ def parse_file(self, file_path: Path) -> AnalysisResult: ) # Extract symbols (both defined and imported) - defined_symbols = self._extract_symbols(tree, file_path) - imported_symbols = self._extract_import_symbols(tree, file_path) + defined_symbols = self._extract_symbols(tree) + imported_symbols = self._extract_import_symbols(tree) all_symbols = defined_symbols + imported_symbols # Extract imports as strings for backward compatibility/caching @@ -86,12 +86,11 @@ def parse_file(self, file_path: Path) -> AnalysisResult: declared_all=declared_all, ) - def _extract_symbols(self, tree: ast.Module, file_path: Path) -> list[DetectedSymbol]: + def _extract_symbols(self, tree: ast.Module) -> list[DetectedSymbol]: """Extract all exportable symbols from AST. Args: tree: Parsed AST module - file_path: Path to source file (for error reporting) Returns: List of detected symbols @@ -252,7 +251,7 @@ def _determine_variable_type(self, name: str, annotation: ast.expr | None) -> Me # Default to variable return MemberType.VARIABLE - def _extract_import_symbols(self, tree: ast.Module, file_path: Path) -> list[DetectedSymbol]: + def _extract_import_symbols(self, tree: ast.Module) -> list[DetectedSymbol]: """Extract import statements as ParsedSymbol objects. Categorizes imports with heuristic metadata to help distinguish likely re-exports