I found this really annoying that Quick Documentation doesn't show attributes, listed in class' docsting. I thought that the reason was incorrect or unsupported docstring format, but behavior is the same for both reST
and Google
styles (I set them properly in Python Integrated Tools
).
My current docstring style is Google
. Let me show what's wrong in pictures:
Here's Actor
class.
As you see,
Attributes
section presents in docstring but not in Quick Documentation pop-up.
Also, there is no annotation on attribute world_id
.
Args
of __init__
recognition works like a charm.
Let's add docstring directly to attribute (how it was suggested in answer). Works great, isn't it?
And call Quick Documentation for attribute inside another method. Wow, there's no description again.
How to get things working? How to set up PyCharm so it catch up class' attributes and show 'em in Quick Documentation?
PyCharm 2018.2.4 (Community Edition). Ubuntu 16.04.