Fix #5436: Autodoc does not work with enum subclasses with properties/methods

This commit is contained in:
Takeshi KOMIYA
2018-09-17 15:10:16 +09:00
parent 6d55e98da1
commit 9e8434f902
4 changed files with 17 additions and 1 deletions

View File

@@ -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

View File

@@ -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',