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
The classmethod in the below class is not getting picked up by autodoc when I include the class with the following:
.. autoclass:: inotify_simple.flags
:members:
classflags(enum.IntEnum):
"""Inotify flags as defined in ``inotify.h`` but with ``IN_`` prefix omitted. Includes a convenience method :func:`~inotify_simple.flags.from_mask` for extracting flags from a mask. """@classmethoddeffrom_mask(cls, mask):
"""Convenience method that returns a list of every flag in a mask."""return [flagforflagincls.__members__.values() ifflag&mask]
ACCESS=0x00000001#: File was accessedMODIFY=0x00000002#: File was modified
...
To Reproduce
Steps to reproduce the behavior:
$ git clone https://github.com/chrisjbillington/inotify_simple
$ cd inotify_simple/doc
$ make html
Then open build/html/index.html and scroll down to or ctrl-f for the classinotify_simple.flags docs, and see that the from_mask() method documentation is not present.
Expected behavior
To see the method documentation for from_mask() under the class.
If I either:
change the class to not be a subclass of enum.IntEnum or
make the method not a classmethod
then I do see the documentation:
So it's an issue specific to the enum class and classmethods.
If I add :undoc-members: then I see the member, but without its function signature or docstring:
The classmethod in the below class is not getting picked up by autodoc when I include the class with the following:
To Reproduce
Steps to reproduce the behavior:
Then open
build/html/index.html
and scroll down to or ctrl-f for theclassinotify_simple.flags
docs, and see that thefrom_mask()
method documentation is not present.Expected behavior
To see the method documentation for
from_mask()
under the class.If I either:
enum.IntEnum
orthen I do see the documentation:
So it's an issue specific to the enum class and classmethods.
If I add
:undoc-members:
then I see the member, but without its function signature or docstring:Your project
https://github.com/chrisjbillington/inotify_simple
Environment info
Readthedocs also fails to render the docs for this classmethod, so the issue is probably not super specific to my environment.
The text was updated successfully, but these errors were encountered: