Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

D102 - Don't enforce docstrings on __new__ and __call__ #8085

Open
DetachHead opened this issue Oct 20, 2023 · 3 comments
Open

D102 - Don't enforce docstrings on __new__ and __call__ #8085

DetachHead opened this issue Oct 20, 2023 · 3 comments
Labels
docstring Related to docstring linting or formatting needs-decision Awaiting a decision from a maintainer

Comments

@DetachHead
Copy link

re-raising PyCQA/pydocstyle#515 here:

This should be considered a magic method (controlled by D105), or at least have a different error code (which may be D107 together with __init__ or even a new one).

@DetachHead DetachHead changed the title Don't enforce docstrings on __new__ D102 - Don't enforce docstrings on __new__ Oct 20, 2023
@DetachHead DetachHead changed the title D102 - Don't enforce docstrings on __new__ D102 - Don't enforce docstrings on __new__ and __call__ Oct 20, 2023
@charliermarsh charliermarsh added docstring Related to docstring linting or formatting needs-decision Awaiting a decision from a maintainer labels Oct 20, 2023
@pya
Copy link

pya commented Mar 30, 2024

pycodestyle doesn't complain about a __new__ method without a docstring. Ruff should be consistent and not consider __new__ an ordinary public method that requires a dosctring.

@dhruvmanila
Copy link
Member

@pya Apologies if it's just a typo but I think the plugin which is being referenced here is pydocstyle ("doc") and not pycodestyle ("code"). pycodestyle doesn't have rules around docstring convention.

@pya
Copy link

pya commented Apr 2, 2024

@dhruvmanila Thanks for the hint. Mixed up "code" and "doc".

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
docstring Related to docstring linting or formatting needs-decision Awaiting a decision from a maintainer
Projects
None yet
Development

No branches or pull requests

4 participants