Automatic inheritance of docstrings
I am using custom_inherit package to automatically inherit docstrings. It would be great if pydocstyle could somehow detect that and not issue a D102 error on such methods.
I think this could be done by some simple heuristic and configuration:
- allowing to specify a list of decorators, which if they are applied to a method make D102 not be made
- allow to list name of a base class/metaclass used, and if it is used, D102 is not made
This might be simpler than #185 and would require only a basic check without really do dynamic analysis of the code.
allowing to specify a list of decorators, which if they are applied to a method make D102 not be made
Isn't that --ignore-decorators ?
allow to list name of a base class/metaclass used, and if it is used, D102 is not made
I or Amir would have to check to see how metaclasses are represented in the AST on Py 2 and Py 3. If they're easily and statically accessible this would be a sensible addition along the lines of --ignore-decorators.
@sigmavirus24 is right about the decorator flag.
Also, (and without checking), I think it should probably be pretty easy to get both parent classes and metaclasses.
I would be interested in this as well since many of my classes use DocInheritMeta as a metaclass.
I accidentally opened an issue in flake8-docstrings making this same request!