mirror of
https://github.com/tiennm99/serena.git
synced 2026-10-13 12:15:10 +00:00
Improve logical clarity of inclusion logic, improve documentation of flags
This commit is contained in:
1 parent
341ac2ed59
commit
f05e425691
2 files changed
+18
-7
No files matched your search
@@ -260,11 +260,13 @@ class JetBrainsPluginClient(ToStringMixin):
|
||||
|
||||
:param name_path: the name path to match
|
||||
:param relative_path: the relative path to which to restrict the search
|
||||
:param include_body: whether to include symbol body content
|
||||
:param include_quick_info: whether to include quick info
|
||||
:param include_documentation: whether to include documentation
|
||||
:param include_num_usages: whether to include number of usages
|
||||
:param depth: depth of children to include (0 = no children)
|
||||
:param include_body: whether to include symbol body content (should typically not be combined with `include_quick_info`
|
||||
or `include_documentation` because the body includes everything)
|
||||
:param include_quick_info: whether to include quick info (typically the signature)
|
||||
:param include_documentation: whether to include documentation; note that this includes the quick info, so one should
|
||||
not pass both `include_quick_info` and this
|
||||
:param include_num_usages: whether to include the number of usages
|
||||
:param depth: depth up to which to include children (0 = no children)
|
||||
:param include_location: whether to include symbol location information
|
||||
:param search_deps: whether to also search in dependencies
|
||||
"""
|
||||
|
||||
@@ -62,8 +62,17 @@ class JetBrainsFindSymbolTool(Tool, ToolMarkerSymbolicRead, ToolMarkerOptional):
|
||||
if relative_path == ".":
|
||||
relative_path = None
|
||||
with JetBrainsPluginClient.from_project(self.project) as client:
|
||||
include_documentation = include_info and not include_body
|
||||
include_quick_info = not include_documentation and not include_info
|
||||
if include_body:
|
||||
include_quick_info = False
|
||||
include_documentation = False
|
||||
else:
|
||||
if include_info:
|
||||
include_documentation = True
|
||||
include_quick_info = False
|
||||
else:
|
||||
# If no additional information is requested, we still include the quick info (type signature)
|
||||
include_documentation = False
|
||||
include_quick_info = True
|
||||
response_dict = client.find_symbol(
|
||||
name_path=name_path_pattern,
|
||||
relative_path=relative_path,
|
||||
|
||||
Reference in new issue
Block a user