Address PR review: use iter_symbols() and make hover tests assertive

- Replace get_all_symbols_and_roots() with iter_symbols() to avoid
  redundant tuple unpacking
- Make hover tests assert that hover_info is not None instead of
  defensive conditionals
This commit is contained in:
Tom Longhurst committed 2026-02-02 22:28:56 +00:00
1 parent 5cb8f62a02
commit 3627f61977
2 files changed
+23 -27

No files matched your search

@@ -200,12 +200,7 @@ class CSharpLanguageServer(SolidLanguageServer):
symbols = super().request_document_symbols(relative_file_path, file_buffer)
# Normalize all symbols recursively
# DocumentSymbols.get_all_symbols_and_roots() returns tuple of (all_symbols, root_symbols)
all_symbols_tuple = symbols.get_all_symbols_and_roots()
all_symbols, _ = all_symbols_tuple
# Process each symbol (which is a UnifiedSymbolInformation dict)
for symbol in all_symbols:
for symbol in symbols.iter_symbols():
self._normalize_symbol_name(symbol, relative_file_path)
return symbols