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

Avoid duplicate calls to autodoc-process-docstring #4198

Merged
merged 3 commits into from
Jan 8, 2018

Conversation

jnothman
Copy link
Contributor

@jnothman jnothman commented Oct 30, 2017

Subject: Avoid duplicate calls to autodoc-process-docstring

Feature or Bugfix

  • Bugfix

Purpose

Autosummary appears to be emitting 'autodoc-process-docstring' on docstrings that have already been processed by 'autodoc-process-docstring'. It does so by calling Documenter.add_content, which calls its process_doc, and then immediately calling process_doc on the output. This PR removes the second call.

I do not yet have a test, and advice on constructing one is welcome.

Relates

@tk0miya
Copy link
Member

tk0miya commented Oct 31, 2017

@shimizukawa could you review this please?

@@ -324,7 +324,7 @@ def get_items(self, names):
# -- Grab the summary

documenter.add_content(None)
doc = list(documenter.process_doc([self.result.data]))
doc = self.result.data
Copy link
Member

Choose a reason for hiding this comment

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

I think this fix is correct. Double calling process_doc is caused by leaving a call of process_doc which became unnecessary on #1444.

Copy link
Member

@shimizukawa shimizukawa left a comment

Choose a reason for hiding this comment

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

LGTM ;)

@shimizukawa shimizukawa merged commit db415ba into sphinx-doc:master Jan 8, 2018
shimizukawa added a commit that referenced this pull request Jan 8, 2018
@jnothman
Copy link
Contributor Author

jnothman commented Jan 8, 2018

I'm glad we agree!

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 8, 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.

3 participants