Skip to content

Conversation

@leojuurinen-vala
Copy link

@leojuurinen-vala leojuurinen-vala commented Dec 1, 2025

Add parsing of the variables from python files to include their line for navigation from robot.

Root Cause:
Python variables imported from .py files had hardcoded line_no=1, col_offset=0, causing go-to-definition to always jump to the beginning of the file instead of the actual variable definition line.

Solution:
Added AST-based line number extraction that parses Python source files to find the actual line numbers and column offsets where variables are defined. Support for RF >= 7.0.

Add parsing of the variables from python files to include their line for navigation from robot.
@leojuurinen-vala leojuurinen-vala marked this pull request as draft December 1, 2025 19:52
@leojuurinen-vala leojuurinen-vala marked this pull request as ready for review December 1, 2025 20:02
@leojuurinen-vala
Copy link
Author

@d-biehl Do you think this is something to consider? Does it seem good for you, not sure if would require any other updates else where? Been testing it and it seems to work, but this is first change I have done for a VSCode plugin, so might be missing something.

@d-biehl
Copy link
Member

d-biehl commented Dec 14, 2025

At first glance this looks nice, but I need to take a closer look at it again — it’s Christmas and there’s just so much going on right now…

Also, for security reasons you should sign your commits — see the CONTRIBUTION.md guides for more information. I won’t just merge unsigned code so easily… hope you understand ;-)

@leojuurinen-vala
Copy link
Author

It is a busy season, hope all goes well and merry :).
That part I missed, I will try fixing the signings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants