Skip to content

Commit d1cccde

Browse files
gkorlandCopilot
andcommitted
fix: address review — fix signatures, use _captures, remove stale files
- Fix CSharpAnalyzer.resolve_import signature to match abstract (add Node type) - Switch add_file_imports to use self._captures() instead of query.captures() - Remove stale CI_OPTIMIZATION.md and test-project/b.py___ - Remove debug print from test Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent ce69973 commit d1cccde

File tree

5 files changed

+3
-244
lines changed

5 files changed

+3
-244
lines changed

CI_OPTIMIZATION.md

Lines changed: 0 additions & 160 deletions
This file was deleted.

api/analyzers/csharp/analyzer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,6 @@ def add_file_imports(self, file: File) -> None:
141141
# C# import tracking not yet implemented
142142
pass
143143

144-
def resolve_import(self, files: dict[Path, File], lsp: SyncLanguageServer, file_path: Path, path: Path, import_node) -> list[Entity]:
144+
def resolve_import(self, files: dict[Path, File], lsp: SyncLanguageServer, file_path: Path, path: Path, import_node: Node) -> list[Entity]:
145145
# C# import resolution not yet implemented
146146
return []

api/analyzers/python/analyzer.py

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -137,16 +137,10 @@ def add_file_imports(self, file: File) -> None:
137137
- from module import name as alias
138138
"""
139139
try:
140-
import warnings
141-
with warnings.catch_warnings():
142-
warnings.simplefilter("ignore")
143-
# Query for both import types
144-
import_query = self.language.query("""
140+
captures = self._captures("""
145141
(import_statement) @import
146142
(import_from_statement) @import_from
147-
""")
148-
149-
captures = import_query.captures(file.tree.root_node)
143+
""", file.tree.root_node)
150144

151145
# Add all import statement nodes to the file
152146
if 'import' in captures:

test-project/b.py___

Lines changed: 0 additions & 73 deletions
This file was deleted.

tests/test_py_imports.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,6 @@ def test_import_tracking(self):
5555
self.assertGreater(len(result.result_set), 0,
5656
"module_b.py should import function_a")
5757

58-
print("✓ Import tracking test passed")
59-
6058
finally:
6159
# Cleanup: delete the test graph
6260
g.delete()

0 commit comments

Comments
 (0)