Skip to content

Commit 459b301

Browse files
authored
Merge pull request #1213 from pre-commit/check-docstring-first-deprecated
deprecate check-docstring-first without replacement
2 parents f4e0254 + d2cf95b commit 459b301

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

.pre-commit-hooks.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
entry: check-case-conflict
3030
language: python
3131
- id: check-docstring-first
32-
name: check docstring is first
32+
name: check docstring is first (deprecated)
3333
description: checks a common error of defining a docstring after code.
3434
entry: check-docstring-first
3535
language: python

README.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,6 @@ Require literal syntax when initializing empty or zero Python builtin types.
4545
#### `check-case-conflict`
4646
Check for files with names that would conflict on a case-insensitive filesystem like MacOS HFS+ or Windows FAT.
4747

48-
#### `check-docstring-first`
49-
Checks for a common error of placing code before the docstring.
50-
5148
#### `check-executables-have-shebangs`
5249
Checks that non-binary executables have a proper shebang.
5350

@@ -207,6 +204,8 @@ Trims trailing whitespace.
207204

208205
- `check-byte-order-marker`: instead use fix-byte-order-marker
209206
- `fix-encoding-pragma`: instead use [`pyupgrade`](https://github.com/asottile/pyupgrade)
207+
- `check-docstring-first`: fundamentally flawed, deprecated without replacement.
208+
210209

211210
### As a standalone package
212211

0 commit comments

Comments
 (0)