mirror of
https://github.com/tiennm99/serena.git
synced 2026-10-13 22:16:23 +00:00
JetBrainsTypeHierarchyTool: Remove error handling (now auto-handled via exception)
This commit is contained in:
1 parent
d58cc58195
commit
021572f572
2 files changed
-5
No files matched your search
@@ -245,8 +245,6 @@ class JetBrainsTypeHierarchyTool(Tool, ToolMarkerSymbolicRead, ToolMarkerOptiona
|
||||
relative_path=relative_path,
|
||||
depth=depth,
|
||||
)
|
||||
if error_msg := supertypes_response.get("error"):
|
||||
return error_msg
|
||||
if "num_levels_not_included" in supertypes_response:
|
||||
levels_not_included["supertypes"] = supertypes_response["num_levels_not_included"]
|
||||
supertypes = self._transform_hierarchy_nodes(supertypes_response.get("hierarchy"))
|
||||
@@ -257,8 +255,6 @@ class JetBrainsTypeHierarchyTool(Tool, ToolMarkerSymbolicRead, ToolMarkerOptiona
|
||||
relative_path=relative_path,
|
||||
depth=depth,
|
||||
)
|
||||
if error_msg := subtypes_response.get("error"):
|
||||
return error_msg
|
||||
if "num_levels_not_included" in subtypes_response:
|
||||
levels_not_included["subtypes"] = subtypes_response["num_levels_not_included"]
|
||||
subtypes = self._transform_hierarchy_nodes(subtypes_response.get("hierarchy"))
|
||||
|
||||
@@ -47,5 +47,4 @@ class TypeHierarchyNodeDTO(TypedDict):
|
||||
|
||||
class TypeHierarchyResponse(TypedDict):
|
||||
hierarchy: NotRequired[list[TypeHierarchyNodeDTO]]
|
||||
error: NotRequired[str]
|
||||
num_levels_not_included: NotRequired[int]
|
||||
Reference in new issue
Block a user