Describe the bug
I have a cpdef enum and I'm trying to get the doc for it in python, but it doesn't seem to be available in the __doc__ attribute and the expected syntax for writing it is also seemingly invalid. And this is even with embedsignature=True.
I set up a demo example so you can see it failing in the tests:
To Reproduce
First I tried the class syntax, like python's enum:
cpdef enum Numbers:
"""Number list."""
one = 1
two = 2
But that gives:
Error compiling Cython file:
------------------------------------------------------------
...
"""
return self.a + self.b
cpdef enum Numbers:
"""Number list."""
^
------------------------------------------------------------
cython_demo_project\numeric.pyx:22:4: Expected an identifier
So I tried:
cpdef enum Numbers:
one = 1
two = 2
"""Number list."""
But that gives:
>>> print(Numbers.__doc__)
An enumeration.
Expected behavior
My ultimate goal is to have the docs show up in sphinx doc generation. But, currently it doesn't seem to be at all included by Cython in the generated code.
Environment (please complete the following information):
- OS: Windows
- Python version: 3.7.3.
- Cython version 0.29.21
Describe the bug
I have a
cpdef enumand I'm trying to get the doc for it in python, but it doesn't seem to be available in the__doc__attribute and the expected syntax for writing it is also seemingly invalid. And this is even withembedsignature=True.I set up a demo example so you can see it failing in the tests:
To Reproduce
First I tried the class syntax, like python's enum:
But that gives:
So I tried:
But that gives:
Expected behavior
My ultimate goal is to have the docs show up in sphinx doc generation. But, currently it doesn't seem to be at all included by Cython in the generated code.
Environment (please complete the following information):