mirror of
https://github.com/tiennm99/serena.git
synced 2026-10-14 04:16:34 +00:00
Add type jb.GetSymbolsOverviewResponse
This commit is contained in:
1 parent
e1e7c233ed
commit
18a9a13f69
2 files changed
+7
-2
No files matched your search
@@ -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,
|
||||
|
||||
@@ -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."""
|
||||
|
||||
Reference in new issue
Block a user