Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix autodoc_docstring_signature support for __init__ and __new__ #9518

Commits on Jul 31, 2021

  1. Fix autodoc_docstring_signature support for __init__ and __new__

    The `MethodDocumenter.get_doc` method added by
    51ae283 prevents
    DocstringSignatureMixin from working correctly for __init__ and
    __new__ methods.  Additionally, the __new__ docstring was not obtained
    correctly.
    
    This commit checks for `self._new_docstrings` being set, and also
    corrects the logic for obtaining the __new__ docstring.
    
    There still remains the issue that when the class signature is
    obtained from the signature of __init__ or __new__, only the real
    signature is used, due to the use of `sphinx.util.inspect.signature`;
    the autodoc_docstring_signature option does not have any effect.
    jbms committed Jul 31, 2021
    Copy the full SHA
    6c969ac View commit details
    Browse the repository at this point in the history