mirror of
https://github.com/pre-commit/pre-commit-hooks.git
synced 2026-03-29 10:16:52 +00:00
include note regarding check-docstring-first
This commit is contained in:
parent
5c514f85cc
commit
8255d780c5
1 changed files with 14 additions and 0 deletions
14
README.md
14
README.md
|
|
@ -48,6 +48,20 @@ Check for files with names that would conflict on a case-insensitive filesystem
|
|||
#### `check-docstring-first`
|
||||
Checks for a common error of placing code before the docstring.
|
||||
|
||||
> [!NOTE]
|
||||
> As raised in [#159](https://github.com/pre-commit/pre-commit-hooks/issues/159) attribute level docstrings will
|
||||
> be flagged by this. A basic workaround is to wrap the docstring with `()` which will bypass this throwing and
|
||||
> error, but could interfere with other libraries that parse them.
|
||||
|
||||
<details><summary>Example</summary>
|
||||
|
||||
```python
|
||||
variable = 42
|
||||
("""Attribute docstring""")
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
#### `check-executables-have-shebangs`
|
||||
Checks that non-binary executables have a proper shebang.
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue