Class docstring applied to fields of class (as Pycharm does) #4759
Replies: 14 comments
-
|
Related on Stack Overflow: In VSCode, how to get on-hover documentation shown for class properties documented in the class docstring? Also, why is this (currently) phrased as a support question if it's a feature-request? |
Beta Was this translation helpful? Give feedback.
-
|
I can confirm this issue/lack of feature. In fact, I posted the original StackOverflow question 😃 |
Beta Was this translation helpful? Give feedback.
-
|
Moving this issue to discussion as an enhancement request for comments and upvotes. |
Beta Was this translation helpful? Give feedback.
-
|
I would really like this feature to be added. |
Beta Was this translation helpful? Give feedback.
-
|
I would also really appreciate this feature being added! |
Beta Was this translation helpful? Give feedback.
-
|
I would like this feature please! |
Beta Was this translation helpful? Give feedback.
-
|
This would be very useful - as of now I have to duplicate these docstrings in both places: 1) for mkdocs, 2) for hoverdocs |
Beta Was this translation helpful? Give feedback.
-
|
I would like this feature! |
Beta Was this translation helpful? Give feedback.
-
|
I would benefit from this feature! |
Beta Was this translation helpful? Give feedback.
-
|
Same! |
Beta Was this translation helpful? Give feedback.
-
|
I would also love this! |
Beta Was this translation helpful? Give feedback.
-
|
I wouldn't complain as well! Looking forward for this feature. It bastly enhances performance as now I have to switch tabs constantly |
Beta Was this translation helpful? Give feedback.
-
|
Yes, I would also like attribute documentation in the class docstring to appear when hovering over attributes. I think if, for some reason, a docstring appears on both the attribute (at creation) and the class docstring, either (1) both are concatenated somehow or (2) the attribute's docstring takes precedence. I recently had to "downgrade" my attribute docstrings for code review because of this. Pycharm apparently does show the attribute docstrings that are defined in the class docstring when hovering over members. I don't know if it supports docstrings on the attribute as vscode does. |
Beta Was this translation helpful? Give feedback.
-
|
Our next prerelease version of Pylance should have this feature added to it. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Code:
Vscode:
PyCharm:
If I write the code like this in VScode, the hover document can be displayed:
But how to display the document in the first way of annotation?
Beta Was this translation helpful? Give feedback.
All reactions