Description
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:
# keyword.py
def example_keyword_1(input_1: str, input_2: int, input_3: bool) -> None:
"""This is an example keyword used for comparing doc string formats
:param input_1: This is input 1
:param input_2: This is input 2
:param input_3: This is input 3
"""
print(f"input 1: {input_1} input 2: {input_2} input 3: {input_3}")
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 the libdoc.doc-format
setting defined in robot.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
in robot.toml
, but it didn't appear to work.
I am also glad to submit a PR for this as well.