-
Notifications
You must be signed in to change notification settings - Fork 187
Wrong “D103: Missing docstring in public function” for overload functions #419
Comments
Both ideas sound good to me. PRs welcome. |
This is a big issue for anyone using type annotations since turning off the error prevents you from ensuring you have documentation coverage. @Nurdok, given this drawback, resolving the issue seems to be of slightly higher priority. |
I've just noticed that you only have two priority tags so maybe this doesn't rise to the level of "major", but it's worth considering that turning off the error negates the huge benefit of guaranteeing doc coverage. |
I am also encountering this. Instead of turning off D102/D103 completely, I think it's possible to add |
I maybe biting more than I can chew. But I think I will take a stab at this. If I understand correctly what is needed here is: |
I think D4xx may still be a good candidate for this error |
Is this also fixed for D102? I'm still getting D102 errors on overloaded functions. |
I'm not seeing D418 errors with the following file:
Should I be expecting to see them? |
For example:
will result in
Which is wrong since only the last def should have a docstring.
Two things should be done:
First, prevent the error D103 for overload functions. We could make use of the
--ignore-decorators='overload'
, but since it is universally valid, it should be a fixed part of it, and the user should not set it by himself.Second, since
@overload
functions should never have docstrings, it would be useful if there is an additional error code in pydocstyle, if someone is setting a docstring for an@overload
function.The text was updated successfully, but these errors were encountered: