-
Notifications
You must be signed in to change notification settings - Fork 16.3k
Closed
Labels
contributors-workshopIssues that are good for first-time contributor's workshopIssues that are good for first-time contributor's workshopgood first issuekind:featureFeature RequestsFeature Requests
Description
We use PyDocStyle in pre-commit to enforce docstring style
We use Ruff to enforce docsting style
Lines 47 to 74 in 23b8e83
| extend-select = [ | |
| "I", # Missing required import (auto-fixable) | |
| "UP", # Pyupgrade | |
| "RUF100", # Unused noqa (auto-fixable) | |
| # implicit single-line string concatenation | |
| "ISC001", | |
| # We ignore more pydocstyle than we enable, so be more selective at what we enable | |
| "D101", | |
| "D106", | |
| "D2", | |
| "D3", | |
| "D400", | |
| # "D401", # Not enabled by ruff, but we don't want it | |
| "D402", | |
| "D403", | |
| "D412", | |
| "D419" | |
| ] | |
| extend-ignore = [ | |
| "D203", | |
| "D205", | |
| "D212", | |
| "D213", | |
| "D214", | |
| "D215", | |
| "E731", | |
| ] |
We follow pep257 style (http://www.pydocstyle.org/en/stable/error_codes.html) for checks.
Currently, we ignore the following rules:
The task is to complete the following missing rules:
Missing Docstrings
- D100 | Missing docstring in public module
- D102 | Missing docstring in public method
- D104 | Missing docstring in public package
[ ] D105 | Missing docstring in magic method: As discussed in https://lists.apache.org/thread/8jbg1dd2lr2cfydtqbjxsd6pb6q2wkc3, Remove D105 from pyproject.toml #38452 - we remove the D105 rule from our checks.- D107 | Missing docstring in
__init__
Whitespace Issues
- D200 | One-line docstring should fit on one line with quotes -- (Add D200 pydocstyle check #11688)
- D202 | No blank lines allowed after function docstring -- (Add D202 pydocstyle check #11032)
- D204 | 1 blank line required after class docstring -- (Add D204 pydocstyle check #11031)
- D205 | 1 blank line required between summary line and description
Docstring Content Issues
- D400 | First line should end with a period
- D401 | First line should be in imperative mood Fix remaining D401 checks #37256
It would be good if we can enable them one by one -- separate PRs are ok
Let me know if you need any help
edithturnpotiuk
Metadata
Metadata
Assignees
Labels
contributors-workshopIssues that are good for first-time contributor's workshopIssues that are good for first-time contributor's workshopgood first issuekind:featureFeature RequestsFeature Requests