mirror of
https://github.com/tiennm99/serena.git
synced 2026-10-14 02:16:21 +00:00
fix: add missing children field to DocumentSymbol TypedDict
The LSP v3.17 spec defines DocumentSymbol.children as an optional list of nested DocumentSymbol entries. The field was absent from the TypedDict, causing type checkers to flag access to 'children' on DocumentSymbol objects and requiring # type: ignore workarounds in ls.py.
This commit is contained in:
1 parent
fc392a4fb8
commit
ed63068045
1 file changed
+2
-2
@@ -2456,8 +2456,8 @@ class DocumentSymbol(TypedDict):
|
||||
selectionRange: "Range"
|
||||
""" The range that should be selected and revealed when this symbol is being picked, e.g the name of a function.
|
||||
Must be contained by the `range`. """
|
||||
|
||||
# TODO: I think this type is missing the 'children' field - DJ
|
||||
children: NotRequired[list["DocumentSymbol"]]
|
||||
""" Children of this symbol, e.g. properties of a class. """
|
||||
|
||||
|
||||
class DocumentSymbolRegistrationOptions(TypedDict):
|
||||
|
||||
Reference in new issue
Block a user