Open amicitas opened 3 years ago
Related Issue: #2
This would be very desirable since classes can have class variables (e.g. pyqt
signals and slots) that should be documented! Currently, a docstring directly below the class
signature or within the __init__
function (if defined) both apply to the __init__
function and the Sphinx documentation says not to mix-and-match this documentation style (see class ExampleClass
in the Google Style Docstrings Example).
For additional reference, please see this SO question. Simply using an Attributes
header does not distinguish between instance vs. class attributes/variables, so I would like to be able to change the header to Class Variables
or Class Attributes
.
I have a class doc-string for which I want to include a custom section. When I include my custom section in
napoleon_custom_section
it works fine for functions and methods, but not for the class itself. Instead I get a warning and the section header is removed.For example:
In my
conf.py
I have the following line:The best behavior would be for custom sections to also work for classes. An acceptable temporary fix would be for the unknown section title to just be passed through and displayed in some emphasized way rather than being removed.