Fix #9189: autodoc: crashed by ValueError on generating signature of property

Autodoc is crashed if `inspect.signature` raises ValueError on
generating signature from a property of the class.  It seems the
original code re-raise the exception meaningless.  So this ignores it
even if raised.
This commit is contained in:
Takeshi KOMIYA 2021-05-09 21:32:56 +09:00
parent cfb9183715
commit 23fcb91c2f
2 changed files with 4 additions and 1 deletions

View File

@ -16,6 +16,9 @@ Features added
Bugs fixed
----------
* #9189: autodoc: crashed when ValueError is raised on generating signature
from a property of the class
Testing
--------

View File

@ -2570,7 +2570,7 @@ class PropertyDocumenter(DocstringStripSignatureMixin, ClassLevelDocumenter): #
self.fullname, exc)
return None
except ValueError:
raise
return None
class NewTypeAttributeDocumenter(AttributeDocumenter):