Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

[pydoclint] Allow ignoring one line docstrings for DOC rules #13302

Merged
merged 6 commits into from
Jan 16, 2025

Conversation

augustelalande
Copy link
Contributor

Summary

Add a setting to allow ignoring one line docstrings for the pydoclint rules.

Resolves #13086

Part of #12434

Test Plan

Run tests with setting enabled.

@augustelalande augustelalande changed the title [pydoclint] Allow ignoring one line docstrings in for DOC rules [pydoclint] Allow ignoring one line docstrings for DOC rules Sep 10, 2024
Copy link
Contributor

github-actions bot commented Sep 10, 2024

ruff-ecosystem results

Linter (stable)

✅ ecosystem check detected no linter changes.

Linter (preview)

✅ ecosystem check detected no linter changes.

Copy link
Member

@AlexWaygood AlexWaygood left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See my question in #13086 (comment) -- I'm not fully sure I understand why this option is desirable yet

@AlexWaygood AlexWaygood added configuration Related to settings and configuration docstring Related to docstring linting or formatting labels Sep 10, 2024
@jsh9
Copy link

jsh9 commented Jan 13, 2025

Hi, over on pydoclint, I have a config option that does the same thing, and it has a different name: --skip-checking-short-docstrings. (More details here: #12434 (comment))

I think ignore-one-line-docstrings is also a good name. If you want to keep using this name, maybe you can add a note in the documentation to say that this ignore-one-line-docstrings is the same as skip-checking-short-docstrings?

@MichaReiser MichaReiser added the needs-decision Awaiting a decision from a maintainer label Jan 13, 2025
@AlexWaygood
Copy link
Member

I'm now persuaded that this configuration option is a good idea -- see my comment at #13086 (comment)

@AlexWaygood AlexWaygood removed the needs-decision Awaiting a decision from a maintainer label Jan 13, 2025
@MichaReiser MichaReiser removed their request for review January 13, 2025 12:41
@dylwil3 dylwil3 self-requested a review January 14, 2025 16:45
@dylwil3
Copy link
Collaborator

dylwil3 commented Jan 16, 2025

Thanks for the great contribution!

I decided to leave the name as-is and write a short note in the docs about the corresponding name in pydoclint - I like that ignore-one-line-docstrings makes it unambiguous what counts as a "short" docstring.

Apologies for the delay in resolving this PR!

@dylwil3 dylwil3 merged commit e84c824 into astral-sh:main Jan 16, 2025
21 checks passed
@augustelalande
Copy link
Contributor Author

Thank you @dylwil3 as always

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
configuration Related to settings and configuration docstring Related to docstring linting or formatting
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow short docstrings in pydoclint
5 participants