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

Option to exclude members inherited from stdlib when 'inherited-members' is enabled #467

Closed
dkbarn opened this issue Jul 23, 2024 · 1 comment

Comments

@dkbarn
Copy link

dkbarn commented Jul 23, 2024

When the 'inherited-members' option is enabled, classes which inherit from a standard library class, such as Exception or TypedDict, will have all of the dunder methods on that class included in the documentation. For example, __str__(), __delattr__(), __dir__(), __eq__(), __format__(), etc etc

It would be helpful if there was a way to exclude members defined in the standard library when 'inherited-members' is enabled, since I can't think of many cases when this is useful to include.

@AWhetter
Copy link
Collaborator

I've taken quite an opinionated approach to this and always excluded members inherited from classes that live in the standard library, with the exception of abstract classes (eg. inheriting from something in collections.abc to make a collection type).
As it is now, I think that the "inherited-members" option is way too verbose, to the point of being unusable.

AWhetter added a commit that referenced this issue Aug 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants