From 0ca61704738550104ebce84d7e1a19ed311318d6 Mon Sep 17 00:00:00 2001 From: Leo Date: Mon, 1 Dec 2025 21:11:30 +0200 Subject: [PATCH 1/2] feat(language-server): add python variable line for robot goto Add parsing of the variables from python files to include their line for navigation from robot. --- .../robot/diagnostics/library_doc.py | 77 +++++++++++++++---- ...[goto.robot-075-013-Imported_Variable].out | 4 +- ...[goto.robot-075-020-Imported_Variable].out | 4 +- ...[goto.robot-075-026-Imported_Variable].out | 4 +- ...[goto.robot-075-013-Imported_Variable].out | 4 +- ...[goto.robot-075-020-Imported_Variable].out | 4 +- ...[goto.robot-075-026-Imported_Variable].out | 4 +- ...[goto.robot-075-013-Imported_Variable].out | 4 +- ...[goto.robot-075-020-Imported_Variable].out | 4 +- ...[goto.robot-075-026-Imported_Variable].out | 4 +- ...[goto.robot-075-013-Imported_Variable].out | 4 +- ...[goto.robot-075-020-Imported_Variable].out | 4 +- ...[goto.robot-075-026-Imported_Variable].out | 4 +- ...[goto.robot-075-013-Imported_Variable].out | 4 +- ...[goto.robot-075-020-Imported_Variable].out | 4 +- ...[goto.robot-075-026-Imported_Variable].out | 4 +- ...[goto.robot-075-013-Imported_Variable].out | 4 +- ...[goto.robot-075-020-Imported_Variable].out | 4 +- ...[goto.robot-075-026-Imported_Variable].out | 4 +- ...[goto.robot-075-013-Imported_Variable].out | 12 +-- ...[goto.robot-075-020-Imported_Variable].out | 12 +-- ...[goto.robot-075-026-Imported_Variable].out | 12 +-- ...[goto.robot-075-013-Imported_Variable].out | 12 +-- ...[goto.robot-075-020-Imported_Variable].out | 12 +-- ...[goto.robot-075-026-Imported_Variable].out | 12 +-- ...[goto.robot-075-013-Imported_Variable].out | 12 +-- ...[goto.robot-075-020-Imported_Variable].out | 12 +-- ...[goto.robot-075-026-Imported_Variable].out | 12 +-- ...[goto.robot-075-013-Imported_Variable].out | 12 +-- ...[goto.robot-075-020-Imported_Variable].out | 12 +-- ...[goto.robot-075-026-Imported_Variable].out | 12 +-- ...[goto.robot-075-013-Imported_Variable].out | 12 +-- ...[goto.robot-075-020-Imported_Variable].out | 12 +-- ...[goto.robot-075-026-Imported_Variable].out | 12 +-- ...[goto.robot-075-013-Imported_Variable].out | 12 +-- ...[goto.robot-075-020-Imported_Variable].out | 12 +-- ...[goto.robot-075-026-Imported_Variable].out | 12 +-- ...[goto.robot-075-013-Imported_Variable].out | 12 +-- ...[goto.robot-075-020-Imported_Variable].out | 12 +-- ...[goto.robot-075-026-Imported_Variable].out | 12 +-- ...[goto.robot-075-013-Imported_Variable].out | 12 +-- ...[goto.robot-075-020-Imported_Variable].out | 12 +-- ...[goto.robot-075-026-Imported_Variable].out | 12 +-- 43 files changed, 241 insertions(+), 196 deletions(-) diff --git a/packages/robot/src/robotcode/robot/diagnostics/library_doc.py b/packages/robot/src/robotcode/robot/diagnostics/library_doc.py index d77a59573..9aa0ed293 100644 --- a/packages/robot/src/robotcode/robot/diagnostics/library_doc.py +++ b/packages/robot/src/robotcode/robot/diagnostics/library_doc.py @@ -2204,6 +2204,42 @@ def find_variables( ) +def _extract_variable_line_numbers_from_python_source(source_path: str) -> Dict[str, Tuple[int, int, int]]: + variable_info: Dict[str, Tuple[int, int, int]] = {} + + try: + with open(source_path, "r", encoding="utf-8") as f: + source_code = f.read() + + tree = ast.parse(source_code, filename=source_path) + + # Find all module-level assignments + for node in ast.walk(tree): + if isinstance(node, ast.Assign): + # Only consider module-level assignments (col_offset == 0) + if node.col_offset == 0 and node.lineno: + for target in node.targets: + if isinstance(target, ast.Name): + # Simple assignment: VAR = value + variable_info[target.id] = (node.lineno, target.col_offset, len(target.id)) + elif isinstance(target, ast.Tuple): + # Tuple unpacking: a, b = values + for elt in target.elts: + if isinstance(elt, ast.Name): + variable_info[elt.id] = (node.lineno, elt.col_offset, len(elt.id)) + elif isinstance(node, ast.AnnAssign): + # Annotated assignment: VAR: int = value + if node.col_offset == 0 and node.lineno: + if isinstance(node.target, ast.Name): + variable_info[node.target.id] = (node.lineno, node.target.col_offset, len(node.target.id)) + except (OSError, SyntaxError): + # If we can't read or parse the file, return empty dict + # Variables will fall back to default line_no=1, col_offset=0 + pass + + return variable_info + + def get_variables_doc( name: str, args: Optional[Tuple[Any, ...]] = None, @@ -2385,24 +2421,33 @@ def _get_initial_handler(self, library: Any, name: Any, method: Any) -> Any: ] ) try: + # Extract line numbers and column offsets from Python source for better go-to-definition + variable_info: Dict[str, Tuple[int, int, int]] = {} + if python_import and source: + variable_info = _extract_variable_line_numbers_from_python_source(source) + # TODO: add type information of the value including dict key names and member names - libdoc.variables = [ - ImportedVariableDefinition( - line_no=1, - col_offset=0, - end_line_no=1, - end_col_offset=0, - source=source or (module_spec.origin if module_spec is not None else None) or "", - name=name if get_robot_version() < (7, 0) else f"${{{name}}}", - name_token=None, - value=( - NativeValue(value) if value is None or isinstance(value, (int, float, bool, str)) else None - ), - has_value=value is None or isinstance(value, (int, float, bool, str)), - value_is_native=value is None or isinstance(value, (int, float, bool, str)), + libdoc.variables = [] + for name, value in importer.import_variables(import_name, args): + var_info = variable_info.get(name, (1, 0, len(name))) + libdoc.variables.append( + ImportedVariableDefinition( + line_no=var_info[0], + col_offset=var_info[1], + end_line_no=var_info[0], + end_col_offset=var_info[1] + var_info[2], + source=source or (module_spec.origin if module_spec is not None else None) or "", + name=(name if get_robot_version() < (7, 0) else f"${{{name}}}"), + name_token=None, + value=( + NativeValue(value) + if value is None or isinstance(value, (int, float, bool, str)) + else None + ), + has_value=value is None or isinstance(value, (int, float, bool, str)), + value_is_native=value is None or isinstance(value, (int, float, bool, str)), + ) ) - for name, value in importer.import_variables(import_name, args) - ] except (SystemExit, KeyboardInterrupt): raise except BaseException as e: diff --git a/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf50/test_goto_definition.test_definition[goto.robot-075-013-Imported_Variable].out b/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf50/test_goto_definition.test_definition[goto.robot-075-013-Imported_Variable].out index ed9e2c89e..1cfe421f2 100644 --- a/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf50/test_goto_definition.test_definition[goto.robot-075-013-Imported_Variable].out +++ b/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf50/test_goto_definition.test_definition[goto.robot-075-013-Imported_Variable].out @@ -13,14 +13,14 @@ result: line: 75 target_range: end: - character: 0 + character: 17 line: 0 start: character: 0 line: 0 target_selection_range: end: - character: 0 + character: 17 line: 0 start: character: 0 diff --git a/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf50/test_goto_definition.test_definition[goto.robot-075-020-Imported_Variable].out b/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf50/test_goto_definition.test_definition[goto.robot-075-020-Imported_Variable].out index d59510da8..2a1b8fcc2 100644 --- a/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf50/test_goto_definition.test_definition[goto.robot-075-020-Imported_Variable].out +++ b/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf50/test_goto_definition.test_definition[goto.robot-075-020-Imported_Variable].out @@ -13,14 +13,14 @@ result: line: 75 target_range: end: - character: 0 + character: 17 line: 0 start: character: 0 line: 0 target_selection_range: end: - character: 0 + character: 17 line: 0 start: character: 0 diff --git a/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf50/test_goto_definition.test_definition[goto.robot-075-026-Imported_Variable].out b/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf50/test_goto_definition.test_definition[goto.robot-075-026-Imported_Variable].out index 7c53a95ac..0025fa6b4 100644 --- a/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf50/test_goto_definition.test_definition[goto.robot-075-026-Imported_Variable].out +++ b/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf50/test_goto_definition.test_definition[goto.robot-075-026-Imported_Variable].out @@ -13,14 +13,14 @@ result: line: 75 target_range: end: - character: 0 + character: 17 line: 0 start: character: 0 line: 0 target_selection_range: end: - character: 0 + character: 17 line: 0 start: character: 0 diff --git a/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf50/test_goto_implementation.test_implementation[goto.robot-075-013-Imported_Variable].out b/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf50/test_goto_implementation.test_implementation[goto.robot-075-013-Imported_Variable].out index ed9e2c89e..1cfe421f2 100644 --- a/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf50/test_goto_implementation.test_implementation[goto.robot-075-013-Imported_Variable].out +++ b/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf50/test_goto_implementation.test_implementation[goto.robot-075-013-Imported_Variable].out @@ -13,14 +13,14 @@ result: line: 75 target_range: end: - character: 0 + character: 17 line: 0 start: character: 0 line: 0 target_selection_range: end: - character: 0 + character: 17 line: 0 start: character: 0 diff --git a/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf50/test_goto_implementation.test_implementation[goto.robot-075-020-Imported_Variable].out b/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf50/test_goto_implementation.test_implementation[goto.robot-075-020-Imported_Variable].out index d59510da8..2a1b8fcc2 100644 --- a/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf50/test_goto_implementation.test_implementation[goto.robot-075-020-Imported_Variable].out +++ b/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf50/test_goto_implementation.test_implementation[goto.robot-075-020-Imported_Variable].out @@ -13,14 +13,14 @@ result: line: 75 target_range: end: - character: 0 + character: 17 line: 0 start: character: 0 line: 0 target_selection_range: end: - character: 0 + character: 17 line: 0 start: character: 0 diff --git a/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf50/test_goto_implementation.test_implementation[goto.robot-075-026-Imported_Variable].out b/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf50/test_goto_implementation.test_implementation[goto.robot-075-026-Imported_Variable].out index 7c53a95ac..0025fa6b4 100644 --- a/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf50/test_goto_implementation.test_implementation[goto.robot-075-026-Imported_Variable].out +++ b/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf50/test_goto_implementation.test_implementation[goto.robot-075-026-Imported_Variable].out @@ -13,14 +13,14 @@ result: line: 75 target_range: end: - character: 0 + character: 17 line: 0 start: character: 0 line: 0 target_selection_range: end: - character: 0 + character: 17 line: 0 start: character: 0 diff --git a/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf60/test_goto_definition.test_definition[goto.robot-075-013-Imported_Variable].out b/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf60/test_goto_definition.test_definition[goto.robot-075-013-Imported_Variable].out index ed9e2c89e..1cfe421f2 100644 --- a/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf60/test_goto_definition.test_definition[goto.robot-075-013-Imported_Variable].out +++ b/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf60/test_goto_definition.test_definition[goto.robot-075-013-Imported_Variable].out @@ -13,14 +13,14 @@ result: line: 75 target_range: end: - character: 0 + character: 17 line: 0 start: character: 0 line: 0 target_selection_range: end: - character: 0 + character: 17 line: 0 start: character: 0 diff --git a/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf60/test_goto_definition.test_definition[goto.robot-075-020-Imported_Variable].out b/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf60/test_goto_definition.test_definition[goto.robot-075-020-Imported_Variable].out index d59510da8..2a1b8fcc2 100644 --- a/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf60/test_goto_definition.test_definition[goto.robot-075-020-Imported_Variable].out +++ b/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf60/test_goto_definition.test_definition[goto.robot-075-020-Imported_Variable].out @@ -13,14 +13,14 @@ result: line: 75 target_range: end: - character: 0 + character: 17 line: 0 start: character: 0 line: 0 target_selection_range: end: - character: 0 + character: 17 line: 0 start: character: 0 diff --git a/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf60/test_goto_definition.test_definition[goto.robot-075-026-Imported_Variable].out b/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf60/test_goto_definition.test_definition[goto.robot-075-026-Imported_Variable].out index 7c53a95ac..0025fa6b4 100644 --- a/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf60/test_goto_definition.test_definition[goto.robot-075-026-Imported_Variable].out +++ b/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf60/test_goto_definition.test_definition[goto.robot-075-026-Imported_Variable].out @@ -13,14 +13,14 @@ result: line: 75 target_range: end: - character: 0 + character: 17 line: 0 start: character: 0 line: 0 target_selection_range: end: - character: 0 + character: 17 line: 0 start: character: 0 diff --git a/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf60/test_goto_implementation.test_implementation[goto.robot-075-013-Imported_Variable].out b/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf60/test_goto_implementation.test_implementation[goto.robot-075-013-Imported_Variable].out index ed9e2c89e..1cfe421f2 100644 --- a/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf60/test_goto_implementation.test_implementation[goto.robot-075-013-Imported_Variable].out +++ b/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf60/test_goto_implementation.test_implementation[goto.robot-075-013-Imported_Variable].out @@ -13,14 +13,14 @@ result: line: 75 target_range: end: - character: 0 + character: 17 line: 0 start: character: 0 line: 0 target_selection_range: end: - character: 0 + character: 17 line: 0 start: character: 0 diff --git a/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf60/test_goto_implementation.test_implementation[goto.robot-075-020-Imported_Variable].out b/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf60/test_goto_implementation.test_implementation[goto.robot-075-020-Imported_Variable].out index d59510da8..2a1b8fcc2 100644 --- a/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf60/test_goto_implementation.test_implementation[goto.robot-075-020-Imported_Variable].out +++ b/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf60/test_goto_implementation.test_implementation[goto.robot-075-020-Imported_Variable].out @@ -13,14 +13,14 @@ result: line: 75 target_range: end: - character: 0 + character: 17 line: 0 start: character: 0 line: 0 target_selection_range: end: - character: 0 + character: 17 line: 0 start: character: 0 diff --git a/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf60/test_goto_implementation.test_implementation[goto.robot-075-026-Imported_Variable].out b/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf60/test_goto_implementation.test_implementation[goto.robot-075-026-Imported_Variable].out index 7c53a95ac..0025fa6b4 100644 --- a/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf60/test_goto_implementation.test_implementation[goto.robot-075-026-Imported_Variable].out +++ b/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf60/test_goto_implementation.test_implementation[goto.robot-075-026-Imported_Variable].out @@ -13,14 +13,14 @@ result: line: 75 target_range: end: - character: 0 + character: 17 line: 0 start: character: 0 line: 0 target_selection_range: end: - character: 0 + character: 17 line: 0 start: character: 0 diff --git a/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf61/test_goto_definition.test_definition[goto.robot-075-013-Imported_Variable].out b/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf61/test_goto_definition.test_definition[goto.robot-075-013-Imported_Variable].out index ed9e2c89e..1cfe421f2 100644 --- a/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf61/test_goto_definition.test_definition[goto.robot-075-013-Imported_Variable].out +++ b/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf61/test_goto_definition.test_definition[goto.robot-075-013-Imported_Variable].out @@ -13,14 +13,14 @@ result: line: 75 target_range: end: - character: 0 + character: 17 line: 0 start: character: 0 line: 0 target_selection_range: end: - character: 0 + character: 17 line: 0 start: character: 0 diff --git a/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf61/test_goto_definition.test_definition[goto.robot-075-020-Imported_Variable].out b/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf61/test_goto_definition.test_definition[goto.robot-075-020-Imported_Variable].out index d59510da8..2a1b8fcc2 100644 --- a/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf61/test_goto_definition.test_definition[goto.robot-075-020-Imported_Variable].out +++ b/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf61/test_goto_definition.test_definition[goto.robot-075-020-Imported_Variable].out @@ -13,14 +13,14 @@ result: line: 75 target_range: end: - character: 0 + character: 17 line: 0 start: character: 0 line: 0 target_selection_range: end: - character: 0 + character: 17 line: 0 start: character: 0 diff --git a/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf61/test_goto_definition.test_definition[goto.robot-075-026-Imported_Variable].out b/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf61/test_goto_definition.test_definition[goto.robot-075-026-Imported_Variable].out index 7c53a95ac..0025fa6b4 100644 --- a/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf61/test_goto_definition.test_definition[goto.robot-075-026-Imported_Variable].out +++ b/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf61/test_goto_definition.test_definition[goto.robot-075-026-Imported_Variable].out @@ -13,14 +13,14 @@ result: line: 75 target_range: end: - character: 0 + character: 17 line: 0 start: character: 0 line: 0 target_selection_range: end: - character: 0 + character: 17 line: 0 start: character: 0 diff --git a/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf61/test_goto_implementation.test_implementation[goto.robot-075-013-Imported_Variable].out b/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf61/test_goto_implementation.test_implementation[goto.robot-075-013-Imported_Variable].out index ed9e2c89e..1cfe421f2 100644 --- a/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf61/test_goto_implementation.test_implementation[goto.robot-075-013-Imported_Variable].out +++ b/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf61/test_goto_implementation.test_implementation[goto.robot-075-013-Imported_Variable].out @@ -13,14 +13,14 @@ result: line: 75 target_range: end: - character: 0 + character: 17 line: 0 start: character: 0 line: 0 target_selection_range: end: - character: 0 + character: 17 line: 0 start: character: 0 diff --git a/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf61/test_goto_implementation.test_implementation[goto.robot-075-020-Imported_Variable].out b/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf61/test_goto_implementation.test_implementation[goto.robot-075-020-Imported_Variable].out index d59510da8..2a1b8fcc2 100644 --- a/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf61/test_goto_implementation.test_implementation[goto.robot-075-020-Imported_Variable].out +++ b/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf61/test_goto_implementation.test_implementation[goto.robot-075-020-Imported_Variable].out @@ -13,14 +13,14 @@ result: line: 75 target_range: end: - character: 0 + character: 17 line: 0 start: character: 0 line: 0 target_selection_range: end: - character: 0 + character: 17 line: 0 start: character: 0 diff --git a/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf61/test_goto_implementation.test_implementation[goto.robot-075-026-Imported_Variable].out b/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf61/test_goto_implementation.test_implementation[goto.robot-075-026-Imported_Variable].out index 7c53a95ac..0025fa6b4 100644 --- a/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf61/test_goto_implementation.test_implementation[goto.robot-075-026-Imported_Variable].out +++ b/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf61/test_goto_implementation.test_implementation[goto.robot-075-026-Imported_Variable].out @@ -13,14 +13,14 @@ result: line: 75 target_range: end: - character: 0 + character: 17 line: 0 start: character: 0 line: 0 target_selection_range: end: - character: 0 + character: 17 line: 0 start: character: 0 diff --git a/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf70/test_goto_definition.test_definition[goto.robot-075-013-Imported_Variable].out b/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf70/test_goto_definition.test_definition[goto.robot-075-013-Imported_Variable].out index ed9e2c89e..43b882cee 100644 --- a/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf70/test_goto_definition.test_definition[goto.robot-075-013-Imported_Variable].out +++ b/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf70/test_goto_definition.test_definition[goto.robot-075-013-Imported_Variable].out @@ -13,16 +13,16 @@ result: line: 75 target_range: end: - character: 0 - line: 0 + character: 14 + line: 4 start: character: 0 - line: 0 + line: 4 target_selection_range: end: - character: 0 - line: 0 + character: 14 + line: 4 start: character: 0 - line: 0 + line: 4 target_uri: myvariables.py diff --git a/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf70/test_goto_definition.test_definition[goto.robot-075-020-Imported_Variable].out b/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf70/test_goto_definition.test_definition[goto.robot-075-020-Imported_Variable].out index d59510da8..31b6ab041 100644 --- a/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf70/test_goto_definition.test_definition[goto.robot-075-020-Imported_Variable].out +++ b/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf70/test_goto_definition.test_definition[goto.robot-075-020-Imported_Variable].out @@ -13,16 +13,16 @@ result: line: 75 target_range: end: - character: 0 - line: 0 + character: 14 + line: 4 start: character: 0 - line: 0 + line: 4 target_selection_range: end: - character: 0 - line: 0 + character: 14 + line: 4 start: character: 0 - line: 0 + line: 4 target_uri: myvariables.py diff --git a/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf70/test_goto_definition.test_definition[goto.robot-075-026-Imported_Variable].out b/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf70/test_goto_definition.test_definition[goto.robot-075-026-Imported_Variable].out index 7c53a95ac..4e34f1854 100644 --- a/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf70/test_goto_definition.test_definition[goto.robot-075-026-Imported_Variable].out +++ b/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf70/test_goto_definition.test_definition[goto.robot-075-026-Imported_Variable].out @@ -13,16 +13,16 @@ result: line: 75 target_range: end: - character: 0 - line: 0 + character: 14 + line: 4 start: character: 0 - line: 0 + line: 4 target_selection_range: end: - character: 0 - line: 0 + character: 14 + line: 4 start: character: 0 - line: 0 + line: 4 target_uri: myvariables.py diff --git a/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf70/test_goto_implementation.test_implementation[goto.robot-075-013-Imported_Variable].out b/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf70/test_goto_implementation.test_implementation[goto.robot-075-013-Imported_Variable].out index ed9e2c89e..43b882cee 100644 --- a/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf70/test_goto_implementation.test_implementation[goto.robot-075-013-Imported_Variable].out +++ b/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf70/test_goto_implementation.test_implementation[goto.robot-075-013-Imported_Variable].out @@ -13,16 +13,16 @@ result: line: 75 target_range: end: - character: 0 - line: 0 + character: 14 + line: 4 start: character: 0 - line: 0 + line: 4 target_selection_range: end: - character: 0 - line: 0 + character: 14 + line: 4 start: character: 0 - line: 0 + line: 4 target_uri: myvariables.py diff --git a/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf70/test_goto_implementation.test_implementation[goto.robot-075-020-Imported_Variable].out b/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf70/test_goto_implementation.test_implementation[goto.robot-075-020-Imported_Variable].out index d59510da8..31b6ab041 100644 --- a/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf70/test_goto_implementation.test_implementation[goto.robot-075-020-Imported_Variable].out +++ b/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf70/test_goto_implementation.test_implementation[goto.robot-075-020-Imported_Variable].out @@ -13,16 +13,16 @@ result: line: 75 target_range: end: - character: 0 - line: 0 + character: 14 + line: 4 start: character: 0 - line: 0 + line: 4 target_selection_range: end: - character: 0 - line: 0 + character: 14 + line: 4 start: character: 0 - line: 0 + line: 4 target_uri: myvariables.py diff --git a/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf70/test_goto_implementation.test_implementation[goto.robot-075-026-Imported_Variable].out b/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf70/test_goto_implementation.test_implementation[goto.robot-075-026-Imported_Variable].out index 7c53a95ac..4e34f1854 100644 --- a/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf70/test_goto_implementation.test_implementation[goto.robot-075-026-Imported_Variable].out +++ b/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf70/test_goto_implementation.test_implementation[goto.robot-075-026-Imported_Variable].out @@ -13,16 +13,16 @@ result: line: 75 target_range: end: - character: 0 - line: 0 + character: 14 + line: 4 start: character: 0 - line: 0 + line: 4 target_selection_range: end: - character: 0 - line: 0 + character: 14 + line: 4 start: character: 0 - line: 0 + line: 4 target_uri: myvariables.py diff --git a/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf71/test_goto_definition.test_definition[goto.robot-075-013-Imported_Variable].out b/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf71/test_goto_definition.test_definition[goto.robot-075-013-Imported_Variable].out index ed9e2c89e..43b882cee 100644 --- a/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf71/test_goto_definition.test_definition[goto.robot-075-013-Imported_Variable].out +++ b/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf71/test_goto_definition.test_definition[goto.robot-075-013-Imported_Variable].out @@ -13,16 +13,16 @@ result: line: 75 target_range: end: - character: 0 - line: 0 + character: 14 + line: 4 start: character: 0 - line: 0 + line: 4 target_selection_range: end: - character: 0 - line: 0 + character: 14 + line: 4 start: character: 0 - line: 0 + line: 4 target_uri: myvariables.py diff --git a/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf71/test_goto_definition.test_definition[goto.robot-075-020-Imported_Variable].out b/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf71/test_goto_definition.test_definition[goto.robot-075-020-Imported_Variable].out index d59510da8..31b6ab041 100644 --- a/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf71/test_goto_definition.test_definition[goto.robot-075-020-Imported_Variable].out +++ b/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf71/test_goto_definition.test_definition[goto.robot-075-020-Imported_Variable].out @@ -13,16 +13,16 @@ result: line: 75 target_range: end: - character: 0 - line: 0 + character: 14 + line: 4 start: character: 0 - line: 0 + line: 4 target_selection_range: end: - character: 0 - line: 0 + character: 14 + line: 4 start: character: 0 - line: 0 + line: 4 target_uri: myvariables.py diff --git a/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf71/test_goto_definition.test_definition[goto.robot-075-026-Imported_Variable].out b/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf71/test_goto_definition.test_definition[goto.robot-075-026-Imported_Variable].out index 7c53a95ac..4e34f1854 100644 --- a/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf71/test_goto_definition.test_definition[goto.robot-075-026-Imported_Variable].out +++ b/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf71/test_goto_definition.test_definition[goto.robot-075-026-Imported_Variable].out @@ -13,16 +13,16 @@ result: line: 75 target_range: end: - character: 0 - line: 0 + character: 14 + line: 4 start: character: 0 - line: 0 + line: 4 target_selection_range: end: - character: 0 - line: 0 + character: 14 + line: 4 start: character: 0 - line: 0 + line: 4 target_uri: myvariables.py diff --git a/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf71/test_goto_implementation.test_implementation[goto.robot-075-013-Imported_Variable].out b/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf71/test_goto_implementation.test_implementation[goto.robot-075-013-Imported_Variable].out index ed9e2c89e..43b882cee 100644 --- a/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf71/test_goto_implementation.test_implementation[goto.robot-075-013-Imported_Variable].out +++ b/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf71/test_goto_implementation.test_implementation[goto.robot-075-013-Imported_Variable].out @@ -13,16 +13,16 @@ result: line: 75 target_range: end: - character: 0 - line: 0 + character: 14 + line: 4 start: character: 0 - line: 0 + line: 4 target_selection_range: end: - character: 0 - line: 0 + character: 14 + line: 4 start: character: 0 - line: 0 + line: 4 target_uri: myvariables.py diff --git a/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf71/test_goto_implementation.test_implementation[goto.robot-075-020-Imported_Variable].out b/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf71/test_goto_implementation.test_implementation[goto.robot-075-020-Imported_Variable].out index d59510da8..31b6ab041 100644 --- a/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf71/test_goto_implementation.test_implementation[goto.robot-075-020-Imported_Variable].out +++ b/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf71/test_goto_implementation.test_implementation[goto.robot-075-020-Imported_Variable].out @@ -13,16 +13,16 @@ result: line: 75 target_range: end: - character: 0 - line: 0 + character: 14 + line: 4 start: character: 0 - line: 0 + line: 4 target_selection_range: end: - character: 0 - line: 0 + character: 14 + line: 4 start: character: 0 - line: 0 + line: 4 target_uri: myvariables.py diff --git a/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf71/test_goto_implementation.test_implementation[goto.robot-075-026-Imported_Variable].out b/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf71/test_goto_implementation.test_implementation[goto.robot-075-026-Imported_Variable].out index 7c53a95ac..4e34f1854 100644 --- a/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf71/test_goto_implementation.test_implementation[goto.robot-075-026-Imported_Variable].out +++ b/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf71/test_goto_implementation.test_implementation[goto.robot-075-026-Imported_Variable].out @@ -13,16 +13,16 @@ result: line: 75 target_range: end: - character: 0 - line: 0 + character: 14 + line: 4 start: character: 0 - line: 0 + line: 4 target_selection_range: end: - character: 0 - line: 0 + character: 14 + line: 4 start: character: 0 - line: 0 + line: 4 target_uri: myvariables.py diff --git a/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf72/test_goto_definition.test_definition[goto.robot-075-013-Imported_Variable].out b/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf72/test_goto_definition.test_definition[goto.robot-075-013-Imported_Variable].out index ed9e2c89e..43b882cee 100644 --- a/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf72/test_goto_definition.test_definition[goto.robot-075-013-Imported_Variable].out +++ b/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf72/test_goto_definition.test_definition[goto.robot-075-013-Imported_Variable].out @@ -13,16 +13,16 @@ result: line: 75 target_range: end: - character: 0 - line: 0 + character: 14 + line: 4 start: character: 0 - line: 0 + line: 4 target_selection_range: end: - character: 0 - line: 0 + character: 14 + line: 4 start: character: 0 - line: 0 + line: 4 target_uri: myvariables.py diff --git a/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf72/test_goto_definition.test_definition[goto.robot-075-020-Imported_Variable].out b/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf72/test_goto_definition.test_definition[goto.robot-075-020-Imported_Variable].out index d59510da8..31b6ab041 100644 --- a/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf72/test_goto_definition.test_definition[goto.robot-075-020-Imported_Variable].out +++ b/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf72/test_goto_definition.test_definition[goto.robot-075-020-Imported_Variable].out @@ -13,16 +13,16 @@ result: line: 75 target_range: end: - character: 0 - line: 0 + character: 14 + line: 4 start: character: 0 - line: 0 + line: 4 target_selection_range: end: - character: 0 - line: 0 + character: 14 + line: 4 start: character: 0 - line: 0 + line: 4 target_uri: myvariables.py diff --git a/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf72/test_goto_definition.test_definition[goto.robot-075-026-Imported_Variable].out b/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf72/test_goto_definition.test_definition[goto.robot-075-026-Imported_Variable].out index 7c53a95ac..4e34f1854 100644 --- a/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf72/test_goto_definition.test_definition[goto.robot-075-026-Imported_Variable].out +++ b/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf72/test_goto_definition.test_definition[goto.robot-075-026-Imported_Variable].out @@ -13,16 +13,16 @@ result: line: 75 target_range: end: - character: 0 - line: 0 + character: 14 + line: 4 start: character: 0 - line: 0 + line: 4 target_selection_range: end: - character: 0 - line: 0 + character: 14 + line: 4 start: character: 0 - line: 0 + line: 4 target_uri: myvariables.py diff --git a/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf72/test_goto_implementation.test_implementation[goto.robot-075-013-Imported_Variable].out b/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf72/test_goto_implementation.test_implementation[goto.robot-075-013-Imported_Variable].out index ed9e2c89e..43b882cee 100644 --- a/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf72/test_goto_implementation.test_implementation[goto.robot-075-013-Imported_Variable].out +++ b/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf72/test_goto_implementation.test_implementation[goto.robot-075-013-Imported_Variable].out @@ -13,16 +13,16 @@ result: line: 75 target_range: end: - character: 0 - line: 0 + character: 14 + line: 4 start: character: 0 - line: 0 + line: 4 target_selection_range: end: - character: 0 - line: 0 + character: 14 + line: 4 start: character: 0 - line: 0 + line: 4 target_uri: myvariables.py diff --git a/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf72/test_goto_implementation.test_implementation[goto.robot-075-020-Imported_Variable].out b/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf72/test_goto_implementation.test_implementation[goto.robot-075-020-Imported_Variable].out index d59510da8..31b6ab041 100644 --- a/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf72/test_goto_implementation.test_implementation[goto.robot-075-020-Imported_Variable].out +++ b/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf72/test_goto_implementation.test_implementation[goto.robot-075-020-Imported_Variable].out @@ -13,16 +13,16 @@ result: line: 75 target_range: end: - character: 0 - line: 0 + character: 14 + line: 4 start: character: 0 - line: 0 + line: 4 target_selection_range: end: - character: 0 - line: 0 + character: 14 + line: 4 start: character: 0 - line: 0 + line: 4 target_uri: myvariables.py diff --git a/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf72/test_goto_implementation.test_implementation[goto.robot-075-026-Imported_Variable].out b/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf72/test_goto_implementation.test_implementation[goto.robot-075-026-Imported_Variable].out index 7c53a95ac..4e34f1854 100644 --- a/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf72/test_goto_implementation.test_implementation[goto.robot-075-026-Imported_Variable].out +++ b/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf72/test_goto_implementation.test_implementation[goto.robot-075-026-Imported_Variable].out @@ -13,16 +13,16 @@ result: line: 75 target_range: end: - character: 0 - line: 0 + character: 14 + line: 4 start: character: 0 - line: 0 + line: 4 target_selection_range: end: - character: 0 - line: 0 + character: 14 + line: 4 start: character: 0 - line: 0 + line: 4 target_uri: myvariables.py diff --git a/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf73/test_goto_definition.test_definition[goto.robot-075-013-Imported_Variable].out b/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf73/test_goto_definition.test_definition[goto.robot-075-013-Imported_Variable].out index ed9e2c89e..43b882cee 100644 --- a/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf73/test_goto_definition.test_definition[goto.robot-075-013-Imported_Variable].out +++ b/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf73/test_goto_definition.test_definition[goto.robot-075-013-Imported_Variable].out @@ -13,16 +13,16 @@ result: line: 75 target_range: end: - character: 0 - line: 0 + character: 14 + line: 4 start: character: 0 - line: 0 + line: 4 target_selection_range: end: - character: 0 - line: 0 + character: 14 + line: 4 start: character: 0 - line: 0 + line: 4 target_uri: myvariables.py diff --git a/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf73/test_goto_definition.test_definition[goto.robot-075-020-Imported_Variable].out b/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf73/test_goto_definition.test_definition[goto.robot-075-020-Imported_Variable].out index d59510da8..31b6ab041 100644 --- a/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf73/test_goto_definition.test_definition[goto.robot-075-020-Imported_Variable].out +++ b/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf73/test_goto_definition.test_definition[goto.robot-075-020-Imported_Variable].out @@ -13,16 +13,16 @@ result: line: 75 target_range: end: - character: 0 - line: 0 + character: 14 + line: 4 start: character: 0 - line: 0 + line: 4 target_selection_range: end: - character: 0 - line: 0 + character: 14 + line: 4 start: character: 0 - line: 0 + line: 4 target_uri: myvariables.py diff --git a/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf73/test_goto_definition.test_definition[goto.robot-075-026-Imported_Variable].out b/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf73/test_goto_definition.test_definition[goto.robot-075-026-Imported_Variable].out index 7c53a95ac..4e34f1854 100644 --- a/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf73/test_goto_definition.test_definition[goto.robot-075-026-Imported_Variable].out +++ b/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf73/test_goto_definition.test_definition[goto.robot-075-026-Imported_Variable].out @@ -13,16 +13,16 @@ result: line: 75 target_range: end: - character: 0 - line: 0 + character: 14 + line: 4 start: character: 0 - line: 0 + line: 4 target_selection_range: end: - character: 0 - line: 0 + character: 14 + line: 4 start: character: 0 - line: 0 + line: 4 target_uri: myvariables.py diff --git a/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf73/test_goto_implementation.test_implementation[goto.robot-075-013-Imported_Variable].out b/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf73/test_goto_implementation.test_implementation[goto.robot-075-013-Imported_Variable].out index ed9e2c89e..43b882cee 100644 --- a/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf73/test_goto_implementation.test_implementation[goto.robot-075-013-Imported_Variable].out +++ b/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf73/test_goto_implementation.test_implementation[goto.robot-075-013-Imported_Variable].out @@ -13,16 +13,16 @@ result: line: 75 target_range: end: - character: 0 - line: 0 + character: 14 + line: 4 start: character: 0 - line: 0 + line: 4 target_selection_range: end: - character: 0 - line: 0 + character: 14 + line: 4 start: character: 0 - line: 0 + line: 4 target_uri: myvariables.py diff --git a/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf73/test_goto_implementation.test_implementation[goto.robot-075-020-Imported_Variable].out b/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf73/test_goto_implementation.test_implementation[goto.robot-075-020-Imported_Variable].out index d59510da8..31b6ab041 100644 --- a/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf73/test_goto_implementation.test_implementation[goto.robot-075-020-Imported_Variable].out +++ b/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf73/test_goto_implementation.test_implementation[goto.robot-075-020-Imported_Variable].out @@ -13,16 +13,16 @@ result: line: 75 target_range: end: - character: 0 - line: 0 + character: 14 + line: 4 start: character: 0 - line: 0 + line: 4 target_selection_range: end: - character: 0 - line: 0 + character: 14 + line: 4 start: character: 0 - line: 0 + line: 4 target_uri: myvariables.py diff --git a/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf73/test_goto_implementation.test_implementation[goto.robot-075-026-Imported_Variable].out b/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf73/test_goto_implementation.test_implementation[goto.robot-075-026-Imported_Variable].out index 7c53a95ac..4e34f1854 100644 --- a/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf73/test_goto_implementation.test_implementation[goto.robot-075-026-Imported_Variable].out +++ b/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf73/test_goto_implementation.test_implementation[goto.robot-075-026-Imported_Variable].out @@ -13,16 +13,16 @@ result: line: 75 target_range: end: - character: 0 - line: 0 + character: 14 + line: 4 start: character: 0 - line: 0 + line: 4 target_selection_range: end: - character: 0 - line: 0 + character: 14 + line: 4 start: character: 0 - line: 0 + line: 4 target_uri: myvariables.py From b4c1a1a164f461bab90652a9f8a334eaa28a454c Mon Sep 17 00:00:00 2001 From: Leo Juurinen Date: Mon, 1 Dec 2025 21:59:41 +0200 Subject: [PATCH 2/2] Revert exception handling extending the offset --- packages/robot/src/robotcode/robot/diagnostics/library_doc.py | 2 +- ....test_definition[goto.robot-075-013-Imported_Variable].out | 4 ++-- ....test_definition[goto.robot-075-020-Imported_Variable].out | 4 ++-- ....test_definition[goto.robot-075-026-Imported_Variable].out | 4 ++-- ...t_implementation[goto.robot-075-013-Imported_Variable].out | 4 ++-- ...t_implementation[goto.robot-075-020-Imported_Variable].out | 4 ++-- ...t_implementation[goto.robot-075-026-Imported_Variable].out | 4 ++-- ....test_definition[goto.robot-075-013-Imported_Variable].out | 4 ++-- ....test_definition[goto.robot-075-020-Imported_Variable].out | 4 ++-- ....test_definition[goto.robot-075-026-Imported_Variable].out | 4 ++-- ...t_implementation[goto.robot-075-013-Imported_Variable].out | 4 ++-- ...t_implementation[goto.robot-075-020-Imported_Variable].out | 4 ++-- ...t_implementation[goto.robot-075-026-Imported_Variable].out | 4 ++-- ....test_definition[goto.robot-075-013-Imported_Variable].out | 4 ++-- ....test_definition[goto.robot-075-020-Imported_Variable].out | 4 ++-- ....test_definition[goto.robot-075-026-Imported_Variable].out | 4 ++-- ...t_implementation[goto.robot-075-013-Imported_Variable].out | 4 ++-- ...t_implementation[goto.robot-075-020-Imported_Variable].out | 4 ++-- ...t_implementation[goto.robot-075-026-Imported_Variable].out | 4 ++-- 19 files changed, 37 insertions(+), 37 deletions(-) diff --git a/packages/robot/src/robotcode/robot/diagnostics/library_doc.py b/packages/robot/src/robotcode/robot/diagnostics/library_doc.py index 9aa0ed293..759d9df36 100644 --- a/packages/robot/src/robotcode/robot/diagnostics/library_doc.py +++ b/packages/robot/src/robotcode/robot/diagnostics/library_doc.py @@ -2429,7 +2429,7 @@ def _get_initial_handler(self, library: Any, name: Any, method: Any) -> Any: # TODO: add type information of the value including dict key names and member names libdoc.variables = [] for name, value in importer.import_variables(import_name, args): - var_info = variable_info.get(name, (1, 0, len(name))) + var_info = variable_info.get(name, (1, 0, 0)) libdoc.variables.append( ImportedVariableDefinition( line_no=var_info[0], diff --git a/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf50/test_goto_definition.test_definition[goto.robot-075-013-Imported_Variable].out b/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf50/test_goto_definition.test_definition[goto.robot-075-013-Imported_Variable].out index 1cfe421f2..ed9e2c89e 100644 --- a/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf50/test_goto_definition.test_definition[goto.robot-075-013-Imported_Variable].out +++ b/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf50/test_goto_definition.test_definition[goto.robot-075-013-Imported_Variable].out @@ -13,14 +13,14 @@ result: line: 75 target_range: end: - character: 17 + character: 0 line: 0 start: character: 0 line: 0 target_selection_range: end: - character: 17 + character: 0 line: 0 start: character: 0 diff --git a/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf50/test_goto_definition.test_definition[goto.robot-075-020-Imported_Variable].out b/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf50/test_goto_definition.test_definition[goto.robot-075-020-Imported_Variable].out index 2a1b8fcc2..d59510da8 100644 --- a/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf50/test_goto_definition.test_definition[goto.robot-075-020-Imported_Variable].out +++ b/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf50/test_goto_definition.test_definition[goto.robot-075-020-Imported_Variable].out @@ -13,14 +13,14 @@ result: line: 75 target_range: end: - character: 17 + character: 0 line: 0 start: character: 0 line: 0 target_selection_range: end: - character: 17 + character: 0 line: 0 start: character: 0 diff --git a/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf50/test_goto_definition.test_definition[goto.robot-075-026-Imported_Variable].out b/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf50/test_goto_definition.test_definition[goto.robot-075-026-Imported_Variable].out index 0025fa6b4..7c53a95ac 100644 --- a/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf50/test_goto_definition.test_definition[goto.robot-075-026-Imported_Variable].out +++ b/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf50/test_goto_definition.test_definition[goto.robot-075-026-Imported_Variable].out @@ -13,14 +13,14 @@ result: line: 75 target_range: end: - character: 17 + character: 0 line: 0 start: character: 0 line: 0 target_selection_range: end: - character: 17 + character: 0 line: 0 start: character: 0 diff --git a/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf50/test_goto_implementation.test_implementation[goto.robot-075-013-Imported_Variable].out b/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf50/test_goto_implementation.test_implementation[goto.robot-075-013-Imported_Variable].out index 1cfe421f2..ed9e2c89e 100644 --- a/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf50/test_goto_implementation.test_implementation[goto.robot-075-013-Imported_Variable].out +++ b/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf50/test_goto_implementation.test_implementation[goto.robot-075-013-Imported_Variable].out @@ -13,14 +13,14 @@ result: line: 75 target_range: end: - character: 17 + character: 0 line: 0 start: character: 0 line: 0 target_selection_range: end: - character: 17 + character: 0 line: 0 start: character: 0 diff --git a/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf50/test_goto_implementation.test_implementation[goto.robot-075-020-Imported_Variable].out b/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf50/test_goto_implementation.test_implementation[goto.robot-075-020-Imported_Variable].out index 2a1b8fcc2..d59510da8 100644 --- a/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf50/test_goto_implementation.test_implementation[goto.robot-075-020-Imported_Variable].out +++ b/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf50/test_goto_implementation.test_implementation[goto.robot-075-020-Imported_Variable].out @@ -13,14 +13,14 @@ result: line: 75 target_range: end: - character: 17 + character: 0 line: 0 start: character: 0 line: 0 target_selection_range: end: - character: 17 + character: 0 line: 0 start: character: 0 diff --git a/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf50/test_goto_implementation.test_implementation[goto.robot-075-026-Imported_Variable].out b/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf50/test_goto_implementation.test_implementation[goto.robot-075-026-Imported_Variable].out index 0025fa6b4..7c53a95ac 100644 --- a/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf50/test_goto_implementation.test_implementation[goto.robot-075-026-Imported_Variable].out +++ b/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf50/test_goto_implementation.test_implementation[goto.robot-075-026-Imported_Variable].out @@ -13,14 +13,14 @@ result: line: 75 target_range: end: - character: 17 + character: 0 line: 0 start: character: 0 line: 0 target_selection_range: end: - character: 17 + character: 0 line: 0 start: character: 0 diff --git a/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf60/test_goto_definition.test_definition[goto.robot-075-013-Imported_Variable].out b/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf60/test_goto_definition.test_definition[goto.robot-075-013-Imported_Variable].out index 1cfe421f2..ed9e2c89e 100644 --- a/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf60/test_goto_definition.test_definition[goto.robot-075-013-Imported_Variable].out +++ b/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf60/test_goto_definition.test_definition[goto.robot-075-013-Imported_Variable].out @@ -13,14 +13,14 @@ result: line: 75 target_range: end: - character: 17 + character: 0 line: 0 start: character: 0 line: 0 target_selection_range: end: - character: 17 + character: 0 line: 0 start: character: 0 diff --git a/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf60/test_goto_definition.test_definition[goto.robot-075-020-Imported_Variable].out b/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf60/test_goto_definition.test_definition[goto.robot-075-020-Imported_Variable].out index 2a1b8fcc2..d59510da8 100644 --- a/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf60/test_goto_definition.test_definition[goto.robot-075-020-Imported_Variable].out +++ b/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf60/test_goto_definition.test_definition[goto.robot-075-020-Imported_Variable].out @@ -13,14 +13,14 @@ result: line: 75 target_range: end: - character: 17 + character: 0 line: 0 start: character: 0 line: 0 target_selection_range: end: - character: 17 + character: 0 line: 0 start: character: 0 diff --git a/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf60/test_goto_definition.test_definition[goto.robot-075-026-Imported_Variable].out b/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf60/test_goto_definition.test_definition[goto.robot-075-026-Imported_Variable].out index 0025fa6b4..7c53a95ac 100644 --- a/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf60/test_goto_definition.test_definition[goto.robot-075-026-Imported_Variable].out +++ b/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf60/test_goto_definition.test_definition[goto.robot-075-026-Imported_Variable].out @@ -13,14 +13,14 @@ result: line: 75 target_range: end: - character: 17 + character: 0 line: 0 start: character: 0 line: 0 target_selection_range: end: - character: 17 + character: 0 line: 0 start: character: 0 diff --git a/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf60/test_goto_implementation.test_implementation[goto.robot-075-013-Imported_Variable].out b/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf60/test_goto_implementation.test_implementation[goto.robot-075-013-Imported_Variable].out index 1cfe421f2..ed9e2c89e 100644 --- a/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf60/test_goto_implementation.test_implementation[goto.robot-075-013-Imported_Variable].out +++ b/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf60/test_goto_implementation.test_implementation[goto.robot-075-013-Imported_Variable].out @@ -13,14 +13,14 @@ result: line: 75 target_range: end: - character: 17 + character: 0 line: 0 start: character: 0 line: 0 target_selection_range: end: - character: 17 + character: 0 line: 0 start: character: 0 diff --git a/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf60/test_goto_implementation.test_implementation[goto.robot-075-020-Imported_Variable].out b/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf60/test_goto_implementation.test_implementation[goto.robot-075-020-Imported_Variable].out index 2a1b8fcc2..d59510da8 100644 --- a/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf60/test_goto_implementation.test_implementation[goto.robot-075-020-Imported_Variable].out +++ b/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf60/test_goto_implementation.test_implementation[goto.robot-075-020-Imported_Variable].out @@ -13,14 +13,14 @@ result: line: 75 target_range: end: - character: 17 + character: 0 line: 0 start: character: 0 line: 0 target_selection_range: end: - character: 17 + character: 0 line: 0 start: character: 0 diff --git a/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf60/test_goto_implementation.test_implementation[goto.robot-075-026-Imported_Variable].out b/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf60/test_goto_implementation.test_implementation[goto.robot-075-026-Imported_Variable].out index 0025fa6b4..7c53a95ac 100644 --- a/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf60/test_goto_implementation.test_implementation[goto.robot-075-026-Imported_Variable].out +++ b/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf60/test_goto_implementation.test_implementation[goto.robot-075-026-Imported_Variable].out @@ -13,14 +13,14 @@ result: line: 75 target_range: end: - character: 17 + character: 0 line: 0 start: character: 0 line: 0 target_selection_range: end: - character: 17 + character: 0 line: 0 start: character: 0 diff --git a/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf61/test_goto_definition.test_definition[goto.robot-075-013-Imported_Variable].out b/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf61/test_goto_definition.test_definition[goto.robot-075-013-Imported_Variable].out index 1cfe421f2..ed9e2c89e 100644 --- a/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf61/test_goto_definition.test_definition[goto.robot-075-013-Imported_Variable].out +++ b/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf61/test_goto_definition.test_definition[goto.robot-075-013-Imported_Variable].out @@ -13,14 +13,14 @@ result: line: 75 target_range: end: - character: 17 + character: 0 line: 0 start: character: 0 line: 0 target_selection_range: end: - character: 17 + character: 0 line: 0 start: character: 0 diff --git a/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf61/test_goto_definition.test_definition[goto.robot-075-020-Imported_Variable].out b/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf61/test_goto_definition.test_definition[goto.robot-075-020-Imported_Variable].out index 2a1b8fcc2..d59510da8 100644 --- a/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf61/test_goto_definition.test_definition[goto.robot-075-020-Imported_Variable].out +++ b/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf61/test_goto_definition.test_definition[goto.robot-075-020-Imported_Variable].out @@ -13,14 +13,14 @@ result: line: 75 target_range: end: - character: 17 + character: 0 line: 0 start: character: 0 line: 0 target_selection_range: end: - character: 17 + character: 0 line: 0 start: character: 0 diff --git a/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf61/test_goto_definition.test_definition[goto.robot-075-026-Imported_Variable].out b/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf61/test_goto_definition.test_definition[goto.robot-075-026-Imported_Variable].out index 0025fa6b4..7c53a95ac 100644 --- a/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf61/test_goto_definition.test_definition[goto.robot-075-026-Imported_Variable].out +++ b/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf61/test_goto_definition.test_definition[goto.robot-075-026-Imported_Variable].out @@ -13,14 +13,14 @@ result: line: 75 target_range: end: - character: 17 + character: 0 line: 0 start: character: 0 line: 0 target_selection_range: end: - character: 17 + character: 0 line: 0 start: character: 0 diff --git a/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf61/test_goto_implementation.test_implementation[goto.robot-075-013-Imported_Variable].out b/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf61/test_goto_implementation.test_implementation[goto.robot-075-013-Imported_Variable].out index 1cfe421f2..ed9e2c89e 100644 --- a/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf61/test_goto_implementation.test_implementation[goto.robot-075-013-Imported_Variable].out +++ b/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf61/test_goto_implementation.test_implementation[goto.robot-075-013-Imported_Variable].out @@ -13,14 +13,14 @@ result: line: 75 target_range: end: - character: 17 + character: 0 line: 0 start: character: 0 line: 0 target_selection_range: end: - character: 17 + character: 0 line: 0 start: character: 0 diff --git a/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf61/test_goto_implementation.test_implementation[goto.robot-075-020-Imported_Variable].out b/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf61/test_goto_implementation.test_implementation[goto.robot-075-020-Imported_Variable].out index 2a1b8fcc2..d59510da8 100644 --- a/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf61/test_goto_implementation.test_implementation[goto.robot-075-020-Imported_Variable].out +++ b/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf61/test_goto_implementation.test_implementation[goto.robot-075-020-Imported_Variable].out @@ -13,14 +13,14 @@ result: line: 75 target_range: end: - character: 17 + character: 0 line: 0 start: character: 0 line: 0 target_selection_range: end: - character: 17 + character: 0 line: 0 start: character: 0 diff --git a/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf61/test_goto_implementation.test_implementation[goto.robot-075-026-Imported_Variable].out b/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf61/test_goto_implementation.test_implementation[goto.robot-075-026-Imported_Variable].out index 0025fa6b4..7c53a95ac 100644 --- a/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf61/test_goto_implementation.test_implementation[goto.robot-075-026-Imported_Variable].out +++ b/tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf61/test_goto_implementation.test_implementation[goto.robot-075-026-Imported_Variable].out @@ -13,14 +13,14 @@ result: line: 75 target_range: end: - character: 17 + character: 0 line: 0 start: character: 0 line: 0 target_selection_range: end: - character: 17 + character: 0 line: 0 start: character: 0