Skip to content

Commit f9b7761

Browse files
committed
chore(pre-commit): remove check-docstring-first
Remove check-docstring-first pre-commit hook as it doesn't support using Sphinx attribute docstrings. Attribute docstrings, as defined in PEP-257 are strings immediately following top level module names. The check-docstring-first hook incorrectly identifies this attribute docstring as a module docstring, indicating either: - "Multiple module docstrings (first docstring on line N)", or - "Module docstring appears after code (code seen on line N)" For details see related discussion on pre-commit issue: pre-commit/pre-commit-hooks#159 Signed-off-by: Stephan Linz <[email protected]>
1 parent 8da1dae commit f9b7761

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

.pre-commit-config.yaml

+3-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,9 @@ repos:
1919
- id: debug-statements
2020
- id: check-builtin-literals
2121
- id: check-case-conflict
22-
- id: check-docstring-first
22+
# Disable the check-docstring-first hook, can be re-enabled when
23+
# https://github.com/pre-commit/pre-commit-hooks/issues/159 is fixed.
24+
# id: check-docstring-first
2325
- id: check-json
2426
- id: check-toml
2527
- id: check-xml

0 commit comments

Comments
 (0)