Use "backtick" (`) in parameter names to render in the doc string hover #2956
Closed
Diogo-Rossi
started this conversation in
Ideas
Replies: 1 comment 1 reply
-
Since it is just a VSCode issue, I prefer not to make any changes to solve the VSCode-specific issue, and it does not seem to be consistent with the NumPy-style docstring. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
VS Code does not have a good doc string render.
To improve that, I found a way to make doc string clearer is to use "backticks" in argument names, so that they got render in VS Code hover make the text more organized.
To sphinx documentation, these backticks are "transparent"
Example
Current docstring (no backticks):
Propose docstring (argument names with backticks):
Necessary trade-off
I found that to the sphinx documentation, this are transparent only if the doc string format already have the "type" of the parameter (like numpy doc string).
If not, sphinx does not put the types automatically.
OBS
This is a proposal to try to solve a VS Code issue. If it brings more problem than benefits, we should left it to the VS Code render be improved.
Beta Was this translation helpful? Give feedback.
All reactions