mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Fix #5436: Autodoc does not work with enum subclasses with properties/methods
This commit is contained in:
@@ -13,3 +13,7 @@ class EnumCls(enum.Enum):
|
||||
val3 = 34
|
||||
"""doc for val3"""
|
||||
val4 = 34
|
||||
|
||||
def say_hello(self):
|
||||
"""a method says hello to you."""
|
||||
pass
|
||||
|
||||
@@ -1271,6 +1271,12 @@ def test_enum_class(app):
|
||||
' this is enum class',
|
||||
' ',
|
||||
' ',
|
||||
' .. py:method:: EnumCls.say_hello()',
|
||||
' :module: target.enum',
|
||||
' ',
|
||||
' a method says hello to you.',
|
||||
' ',
|
||||
' ',
|
||||
' .. py:attribute:: EnumCls.val1',
|
||||
' :module: target.enum',
|
||||
' :annotation: = 12',
|
||||
|
||||
Reference in New Issue
Block a user