You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 26, 2023. It is now read-only.
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:
class Example():
"""
An example class
Programming Notes
-----------------
This is my custom section that I would like to show in my class doc-string.
"""
In my conf.py I have the following line:
napoleon_custom_sections = ['Programming Notes']
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.
The text was updated successfully, but these errors were encountered:
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.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
The text was updated successfully, but these errors were encountered: