tree-sitter-analyzer 1.0.0__py3-none-any.whl → 1.1.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of tree-sitter-analyzer might be problematic. Click here for more details.
- tree_sitter_analyzer/__init__.py +132 -132
- tree_sitter_analyzer/api.py +542 -542
- tree_sitter_analyzer/cli/commands/base_command.py +181 -181
- tree_sitter_analyzer/cli/commands/partial_read_command.py +139 -139
- tree_sitter_analyzer/cli/info_commands.py +124 -124
- tree_sitter_analyzer/cli_main.py +327 -327
- tree_sitter_analyzer/core/analysis_engine.py +584 -584
- tree_sitter_analyzer/core/query_service.py +162 -162
- tree_sitter_analyzer/file_handler.py +212 -212
- tree_sitter_analyzer/formatters/base_formatter.py +169 -169
- tree_sitter_analyzer/interfaces/cli.py +535 -535
- tree_sitter_analyzer/mcp/__init__.py +1 -1
- tree_sitter_analyzer/mcp/resources/__init__.py +0 -1
- tree_sitter_analyzer/mcp/resources/project_stats_resource.py +16 -5
- tree_sitter_analyzer/mcp/server.py +655 -655
- tree_sitter_analyzer/mcp/tools/__init__.py +28 -30
- tree_sitter_analyzer/mcp/utils/__init__.py +1 -2
- tree_sitter_analyzer/mcp/utils/error_handler.py +569 -569
- tree_sitter_analyzer/mcp/utils/path_resolver.py +414 -414
- tree_sitter_analyzer/output_manager.py +257 -257
- tree_sitter_analyzer/project_detector.py +330 -330
- tree_sitter_analyzer/security/boundary_manager.py +260 -260
- tree_sitter_analyzer/security/validator.py +257 -257
- tree_sitter_analyzer/table_formatter.py +710 -710
- tree_sitter_analyzer/utils.py +335 -335
- {tree_sitter_analyzer-1.0.0.dist-info → tree_sitter_analyzer-1.1.1.dist-info}/METADATA +12 -12
- {tree_sitter_analyzer-1.0.0.dist-info → tree_sitter_analyzer-1.1.1.dist-info}/RECORD +29 -29
- {tree_sitter_analyzer-1.0.0.dist-info → tree_sitter_analyzer-1.1.1.dist-info}/WHEEL +0 -0
- {tree_sitter_analyzer-1.0.0.dist-info → tree_sitter_analyzer-1.1.1.dist-info}/entry_points.txt +0 -0
|
@@ -123,8 +123,8 @@ class ProjectStatsResource:
|
|
|
123
123
|
|
|
124
124
|
self._project_path = project_path
|
|
125
125
|
|
|
126
|
-
#
|
|
127
|
-
|
|
126
|
+
# Note: analysis_engine is already initialized in __init__
|
|
127
|
+
# No need to reinitialize here
|
|
128
128
|
|
|
129
129
|
logger.debug(f"Set project path to: {project_path}")
|
|
130
130
|
|
|
@@ -336,16 +336,27 @@ class ProjectStatsResource:
|
|
|
336
336
|
|
|
337
337
|
# Use appropriate analyzer based on language
|
|
338
338
|
if language == "java":
|
|
339
|
-
# Use
|
|
340
|
-
|
|
341
|
-
file_analysis = await self._advanced_analyzer.analyze_file(
|
|
339
|
+
# Use analysis engine for Java
|
|
340
|
+
file_analysis = await self.analysis_engine.analyze_file(
|
|
342
341
|
str(file_path)
|
|
343
342
|
)
|
|
344
343
|
if file_analysis and hasattr(file_analysis, "methods"):
|
|
344
|
+
# Extract complexity from methods if available
|
|
345
345
|
complexity = sum(
|
|
346
346
|
method.complexity_score or 0
|
|
347
347
|
for method in file_analysis.methods
|
|
348
348
|
)
|
|
349
|
+
elif file_analysis and hasattr(file_analysis, "elements"):
|
|
350
|
+
# Extract complexity from elements for new architecture
|
|
351
|
+
methods = [
|
|
352
|
+
e
|
|
353
|
+
for e in file_analysis.elements
|
|
354
|
+
if hasattr(e, "complexity_score")
|
|
355
|
+
]
|
|
356
|
+
complexity = sum(
|
|
357
|
+
getattr(method, "complexity_score", 0) or 0
|
|
358
|
+
for method in methods
|
|
359
|
+
)
|
|
349
360
|
else:
|
|
350
361
|
complexity = 0
|
|
351
362
|
else:
|