diff --git a/src/serena/tools/jetbrains_plugin_client.py b/src/serena/tools/jetbrains_plugin_client.py index 7bf9894b..0cd236f3 100644 --- a/src/serena/tools/jetbrains_plugin_client.py +++ b/src/serena/tools/jetbrains_plugin_client.py @@ -220,14 +220,16 @@ class JetBrainsPluginClient(ToStringMixin): request_data = {"namePath": name_path, "relativePath": relative_path, "includeQuickInfo": include_quick_info} return cast(jb.SymbolCollectionResponse, self._make_request("POST", "/findReferences", request_data)) - def get_symbols_overview(self, relative_path: str, depth: int, include_file_documentation: bool = False) -> jb.SymbolCollectionResponse: + def get_symbols_overview( + self, relative_path: str, depth: int, include_file_documentation: bool = False + ) -> jb.GetSymbolsOverviewResponse: """ :param relative_path: the relative path to a source file :param depth: the depth of children to include (0 = no children) :param include_file_documentation: whether to include the file's documentation string (if any) """ request_data = {"relativePath": relative_path, "depth": depth, "includeFileDocumentation": include_file_documentation} - return cast(jb.SymbolCollectionResponse, self._make_request("POST", "/getSymbolsOverview", request_data)) + return cast(jb.GetSymbolsOverviewResponse, self._make_request("POST", "/getSymbolsOverview", request_data)) def get_supertypes( self, diff --git a/src/serena/tools/jetbrains_types.py b/src/serena/tools/jetbrains_types.py index c19ba4e6..f71874c3 100644 --- a/src/serena/tools/jetbrains_types.py +++ b/src/serena/tools/jetbrains_types.py @@ -32,6 +32,9 @@ class SymbolDTO(TypedDict): class SymbolCollectionResponse(TypedDict): symbols: list[SymbolDTO] + + +class GetSymbolsOverviewResponse(SymbolCollectionResponse): documentation: NotRequired[str] """Docstring of the collection (if applicable - usually present only if the collection is from a single file), as HTML string."""