mirror of
https://github.com/tiennm99/serena.git
synced 2026-10-14 08:18:36 +00:00
Fixes in typed dicts (incorrect translation from java)
This commit is contained in:
1 parent
7be24d185f
commit
16c6b7eacf
2 files changed
+6
-11
No files matched your search
@@ -194,7 +194,7 @@ class JetBrainsTypeHierarchyTool(Tool, ToolMarkerSymbolicRead, ToolMarkerOptiona
|
||||
"""
|
||||
|
||||
@staticmethod
|
||||
def _transform_hierarchy_nodes(nodes: list[jb.TypeHierarchyNode] | None) -> dict[str, list]:
|
||||
def _transform_hierarchy_nodes(nodes: list[jb.TypeHierarchyNodeDTO] | None) -> dict[str, list]:
|
||||
"""
|
||||
Transform a list of TypeHierarchyNode into a file-grouped compact format.
|
||||
|
||||
|
||||
@@ -17,12 +17,12 @@ class SymbolDTO(TypedDict):
|
||||
name_path: str
|
||||
relative_path: str
|
||||
type: str
|
||||
body: str
|
||||
body: NotRequired[str]
|
||||
quick_info: NotRequired[str]
|
||||
"""Quick info text (e.g., type signature) for the symbol, as HTML string."""
|
||||
documentation: NotRequired[str]
|
||||
"""Documentation text for the symbol (if available), as HTML string."""
|
||||
text_range: TextRangeDTO
|
||||
text_range: NotRequired[TextRangeDTO]
|
||||
children: NotRequired[list["SymbolDTO"]]
|
||||
|
||||
|
||||
@@ -33,18 +33,13 @@ class SymbolCollectionResponse(TypedDict):
|
||||
as HTML string."""
|
||||
|
||||
|
||||
class TypeHierarchyNode(TypedDict):
|
||||
class TypeHierarchyNodeDTO(TypedDict):
|
||||
symbol: SymbolDTO
|
||||
children: NotRequired[list["TypeHierarchyNode"]]
|
||||
|
||||
|
||||
class TypeHierarchy(TypedDict):
|
||||
nodes: list[TypeHierarchyNode]
|
||||
depth: int
|
||||
children: NotRequired[list["TypeHierarchyNodeDTO"]]
|
||||
|
||||
|
||||
class TypeHierarchyResponse(TypedDict):
|
||||
symbol: NotRequired[SymbolDTO]
|
||||
hierarchy: NotRequired[list[TypeHierarchyNode]]
|
||||
hierarchy: NotRequired[list[TypeHierarchyNodeDTO]]
|
||||
error: NotRequired[str]
|
||||
num_levels_not_included: NotRequired[int]
|
||||
Reference in new issue
Block a user