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

autodoc: the signature of base function will be shown for decorated functions #7916

Merged
merged 1 commit into from Jul 5, 2020

Conversation

tk0miya
Copy link
Member

@tk0miya tk0miya commented Jul 4, 2020

@tk0miya tk0miya added this to the 3.1.2 milestone Jul 4, 2020
@tk0miya tk0miya merged commit 3e64373 into sphinx-doc:3.1.x Jul 5, 2020
@tk0miya tk0miya deleted the 7650_signatures_for_decorator branch July 5, 2020 03:13
sig = inspect.signature(self.object, follow_wrapped=True)
else:
sig = inspect.signature(self.object)
sig = inspect.signature(self.object, follow_wrapped=True)
Copy link
Contributor

@harupy harupy Aug 11, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tk0miya Should we specify follow_wrapeed=True in inspect.signature in ClassDocumenter as well otherwise a wrapper function's signature (e.g. (*args, **kwargs)) would be used when __init__ is decorated?

sig = inspect.signature(init, bound_method=True)

Copy link
Contributor

@harupy harupy Aug 11, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The same goes for the line below:

sig = inspect.signature(obj, bound_method)

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 24, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants