PyCQA / pydocstyle

docstring style checker
http://pydocstyle.org
MIT License
1.11k stars 189 forks source link

Preventing the D103 error when the function is decorated with @overload. #511

Closed theyuvalraz closed 4 years ago

theyuvalraz commented 4 years ago

Fixes #419

Added an is_overload method in the function class(parser.py).

Added an if statement so that the D103 error will not trigger when decorated with @overload(checker.py)

Added some tests to see that it's working correctly.

The lambda method in the checker returns None, not sure its a good practice. any suggestions ?

sambhav commented 4 years ago

@theyuvalraz can you please rebase :)?

sambhav commented 4 years ago

@theyuvalraz we also introduced isort and black formatting to the source code.

You will want to run black src/pydocstyle and isort src/pydocstyle from the project root

after installing the pinned versions from the requirements file.

sambhav commented 4 years ago

apart from the above lgtm

sambhav commented 4 years ago

Thanks everything looks good! Can you also update the release notes with this change?

sambhav commented 4 years ago

Thank you for this pull request!

domdfcoding commented 3 years ago

@samj1912 would it be possible to have a new release of pydocstyle with this feature?

sambhav commented 3 years ago

Yeah, didn't notice this was not released. I will cut a release later today.