-
-
Notifications
You must be signed in to change notification settings - Fork 21
[ENHANCEMENT] Language Server: Python Keyword Docstring Hover Format #454
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@d-biehl - sorry to bump this but we are very interested in your opinion...mainly to determine if this is correctly diagnosed as an enhancement. Glad to move this issue to a discussion or start another conversation there. |
Hey! RobotCode can only display the documentation formats that Robot Framework itself supports. Since Robot Framework doesn't recognize Google-Style or NumPy-Style docstrings, RobotCode can't display them in formatted form either. Supported FormatsRobot Framework currently only recognizes these documentation formats:
Google and NumPy styles are unfortunately not supported. How it WorksYou define the format directly in your library: ROBOT_LIBRARY_DOC_FORMAT = "ROBOT" # Recommended - works without dependencies
# or
ROBOT_LIBRARY_DOC_FORMAT = "reST" # Requires docutils The You can find more details in the Robot Framework Documentation.
How RobotCode WorksRobotCode generates documentation based on your library's
OutlookMarkdown support for Robot Framework is already planned! There's a Feature Request (#5304) in the milestone for version 7.4. The Robot Framework documentation is also being ported to Markdown – there are already corresponding discussions in Slack and corresponding repositories (just can't find the link right now). Your Options
The Documentation:
A major problem in the Python world is indeed the variety of documentation formats. Robot Framework deliberately supports only the above formats (and later Markdown as well) – this is a pragmatic decision for better compatibility, fewer dependencies, and a better user experience. RobotCode will therefore not provide support for Google-Style or NumPy-Style docstrings, unless Robot Framework itself implements this in the future. Is this sufficient as a foundation for further discussion, or are there still open questions? |
Uh oh!
There was an error while loading. Please reload this page.
When using the
vscode
extension and hovering over a keyword defined in Python, the documentation displayed when hovering over the keyword is unformatted. For example, for the keyword below:which renders as:
Its seems only markdown is supported.
Proposed Solution
The docstring should be rendered based on the docstring format (reST, Google or Numpy). Instead of having
robotcode
try to guess the format, using thelibdoc.doc-format
setting defined inrobot.toml
Alternatives Considered
We can write the Python docstrings in markdown, but this then has consequences for other tooling for Python.
Additional Context
I was unable to find if this an configuration option already defined. I tried using the
libdoc.doc-format
inrobot.toml
, but it didn't appear to work.I am also glad to submit a PR for this as well.
The text was updated successfully, but these errors were encountered: