Answer the question
In order to leave comments, you need to log in
How do I set the description of a module constant in PyCharm so that it is displayed in the Ctrl+Q quick documentation?
I have a separate module in the project, which contains all sorts of settings. For example, there is a constant AREA_CM2_PER_CM3_OF_PAINT. I really want to somehow describe in more detail in her own docstring. How can I do that?
Answer the question
In order to leave comments, you need to log in
Generally speaking, the language does not have docstring support for variables.
However, there are the following options for documenting documents:
class A:
x = 22
"""Docstring for class variable A.x"""
def __init__(self, a):
self.y = a
"""Docstring for instance variable A.y"""
#: docstring for x
x = 22
x = 22 #: docstring for x
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question