econchick / interrogate

Explain yourself! Interrogate a codebase for docstring coverage.
https://interrogate.readthedocs.io
MIT License
565 stars 46 forks source link

Option to ignore overloaded functions #97

Closed ErwinJunge closed 3 months ago

ErwinJunge commented 2 years ago

Describe the feature you'd like

When decorating functions with @typing.overload, the stubs are marked as not covered when they don't have their own docstring. My suggestion is to add an option to ignore those stubs.

Is your feature request related to a problem?

We have overloaded functions in our codebase that we want to start using this package in and we only document the actual implementation and not the stubs.

Your Environment

Additional context

PR incoming.

amin-nejad commented 2 years ago

Another option is to ignore flake8 rule D418 (doesn't allow docstrings for overloads) and just give the overloaded functions/methods docstrings. But agree it would be good to have the option to have interrogate ignore them for this purpose.

jmahlik commented 1 year ago

Had to disable interrogate since I started making use of overloads.