Skip to content

Commit 3fa09a7

Browse files
committed
fix(langserver): display the return type in hover only when it is explicitly defined
1 parent 2254156 commit 3fa09a7

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

packages/robot/src/robotcode/robot/diagnostics/library_doc.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1926,7 +1926,13 @@ def get_args_to_process(libdoc_name: str, kw_name: str) -> Any:
19261926
)
19271927
if not kw[1].is_error_handler
19281928
else None,
1929-
return_type=str(kw[1].args.return_type) if get_robot_version() >= (7, 0) else None,
1929+
return_type=(
1930+
str(kw[1].args.return_type)
1931+
if kw[1].args.return_type is not None and kw[1].args.return_type != type(None)
1932+
else None
1933+
)
1934+
if get_robot_version() >= (7, 0)
1935+
else None,
19301936
)
19311937
for kw in keyword_docs
19321938
],

0 commit comments

Comments
 (0)