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 #8143: AttributeError if autodoc_default_options contains False #8144

Merged
merged 1 commit into from Aug 29, 2020

Conversation

tk0miya
Copy link
Member

@tk0miya tk0miya commented Aug 21, 2020

Feature or Bugfix

  • Bugfix

Purpose

…ns False

autodoc crahses when autodoc_default_options contains False value
unexpectedly.  After this change, it also accepts False.
@@ -94,7 +94,10 @@ def members_option(arg: Any) -> Union[object, List[str]]:
"""Used to convert the :members: option to auto directives."""
if arg is None or arg is True:
return ALL
return [x.strip() for x in arg.split(',') if x.strip()]
elif arg is False:
return None
Copy link
Contributor

Choose a reason for hiding this comment

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

I would expect EMPTY here. WDYT?

Copy link
Member Author

Choose a reason for hiding this comment

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

No, I don't think so. None means the option is not set. And it skips all private-members automatically (as auto* directive does by default). At present, all :members:, :inherited-members: and :private-members: don't become EMPTY. I guess it will break autodoc unexpectedly.

Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks for the explanation.

@tk0miya tk0miya merged commit a16cca2 into sphinx-doc:3.x Aug 29, 2020
@tk0miya tk0miya deleted the 8143_autodoc_default_value_False branch August 29, 2020 21:21
@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