We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
check-docstring-first
1 parent 5c514f8 commit 8255d78Copy full SHA for 8255d78
1 file changed
README.md
@@ -48,6 +48,20 @@ Check for files with names that would conflict on a case-insensitive filesystem
48
#### `check-docstring-first`
49
Checks for a common error of placing code before the docstring.
50
51
+> [!NOTE]
52
+> As raised in [#159](https://github.com/pre-commit/pre-commit-hooks/issues/159) attribute level docstrings will
53
+> be flagged by this. A basic workaround is to wrap the docstring with `()` which will bypass this throwing and
54
+> error, but could interfere with other libraries that parse them.
55
+
56
+<details><summary>Example</summary>
57
58
+```python
59
+variable = 42
60
+("""Attribute docstring""")
61
+```
62
63
+</details>
64
65
#### `check-executables-have-shebangs`
66
Checks that non-binary executables have a proper shebang.
67
0 commit comments