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 #904: autodoc: An instance attribute cause a crash of autofunction #7946

Merged
merged 1 commit into from Jul 16, 2020

Conversation

tk0miya
Copy link
Member

@tk0miya tk0miya commented Jul 12, 2020

Feature or Bugfix

  • Bugfix

Purpose

  • refs: autodocs does not work well with instance attributes. #904

  • So far, autofunction only checks the existence of the class variable.
    As a result, it crashes with AttributeError if an instance variable is
    specified.

    This adds an exisitence for instance attributes via ModuleAnalyzer
    before getattr-check.

@tk0miya tk0miya force-pushed the 904_autofunction_ivar_support branch from a856448 to 610ab92 Compare July 16, 2020 14:59
@tk0miya tk0miya merged commit 8c8943f into sphinx-doc:3.x Jul 16, 2020
@tk0miya tk0miya deleted the 904_autofunction_ivar_support branch July 16, 2020 15:52
tk0miya added a commit to tk0miya/sphinx that referenced this pull request Nov 25, 2020
InstanceAttributeDocumenter is merged into AttributeDocumenter in sphinx-doc#7946
and sphinx-doc#8444. So it is no longer needed now.
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 26, 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

1 participant