-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
autosummary: Add an option to skip inherited members #4029
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
base: master
Are you sure you want to change the base?
Conversation
What is difference from |
Autosummary documents all members by default. |
Ah, you're right. Indeed, autosummary does not have such option. @shimizukawa could you review this please? In addition, it seems there are no testcases. could you add them? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Needs a mypy fix to fix the build
def generate_autosummary_docs(sources, output_dir=None, suffix='.rst', | ||
warn=_simple_warn, info=_simple_info, | ||
base_path=None, builder=None, template_dir=None, | ||
imported_members=False): | ||
imported_members=False, inherited_members=None): | ||
# type: (List[unicode], unicode, unicode, Callable, Callable, unicode, Builder, unicode, bool) -> None # NOQA |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line is the cause of your Travis CI build failure. I imagine you need to add unicode
to the first tuple, like so:
# type: (List[unicode], unicode, unicode, Callable, Callable, unicode, Builder, unicode, bool, unicode)
Any updates? In this weekend, we call feature freeze for 1.7.
I feel this is good enhancement. so I'd like to introduce if possible. |
Any updates? The feature freeze of 1.8 will come soon. |
Any update on this? I'm running into the same desire as @niboshi. I'd like for the |
Add an option to control whether inherited members are included.
Feature or Bugfix
Purpose
Currently autosummary generates documents for inherited members as well.
This PR adds an option to control it.
Detail
autosummary_inherited_members = 'all'
: document all members regardless of inheritance (default)autosummary_inherited_members = 'overridden'
: document overridden and new membersautosummary_inherited_members = 'none'
: document only new membersRelates