Parse the arguments list from obj_type.__init__.__doc__
too.
This commit is contained in:
parent
1474685cc0
commit
2a30f060b4
1 changed files with 9 additions and 3 deletions
|
@ -52,9 +52,15 @@ class Model:
|
|||
self.package = obj_type.__module__[len(prefix) :]
|
||||
self.name = name or self.package
|
||||
self.last_modified = last_modified
|
||||
self.doc, argsdoc = self._parse_docstring(
|
||||
doc or obj_type.__doc__ or '', obj_type=obj_type
|
||||
)
|
||||
|
||||
docstring = doc or ''
|
||||
if obj_type.__doc__:
|
||||
docstring += '\n\n' + obj_type.__doc__
|
||||
|
||||
if hasattr(obj_type, '__init__'):
|
||||
docstring += '\n\n' + (obj_type.__init__.__doc__ or '')
|
||||
|
||||
self.doc, argsdoc = self._parse_docstring(docstring, obj_type=obj_type)
|
||||
self.args = {}
|
||||
self.has_kwargs = False
|
||||
|
||||
|
|
Loading…
Reference in a new issue