Skip to content

Commit 9a18b57

Browse files
committed
Enforce some pydocstyle lints with flake8-docstrings
There are some ones we *would* like to enforce, like D401 First line should be in imperative mood but have too many false positives, so I left them out.
1 parent b8471aa commit 9a18b57

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

.pre-commit-config.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,9 @@ repos:
2525
hooks:
2626
- id: flake8
2727
language_version: python3
28-
additional_dependencies: [flake8-typing-imports==1.9.0]
28+
additional_dependencies:
29+
- flake8-typing-imports==1.9.0
30+
- flake8-docstrings==1.5.0
2931
- repo: https://github.com/asottile/reorder_python_imports
3032
rev: v2.3.0
3133
hooks:

tox.ini

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,17 @@ commands = python scripts/publish-gh-release-notes.py {posargs}
154154

155155
[flake8]
156156
max-line-length = 120
157-
extend-ignore = E203
157+
extend-ignore =
158+
; whitespace before ':'
159+
E203
160+
; Missing Docstrings
161+
D100,D101,D102,D103,D104,D105,D106,D107
162+
; Whitespace Issues
163+
D202,D203,D204,D205,D209,D213
164+
; Quotes Issues
165+
D302
166+
; Docstring Content Issues
167+
D400,D401,D401,D402,D405,D406,D407,D408,D409,D410,D411,D412,D413,D414,D415,D416,D417
158168

159169
[isort]
160170
; This config mimics what reorder-python-imports does.

0 commit comments

Comments
 (0)