-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add doc on how to ignore certain violations
- Loading branch information
Showing
3 changed files
with
35 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# How to ignore certain violations in *flake8* mode | ||
|
||
In *flake8* mode (meaning that you use *pydoclint* as a flake8 plugin), if you'd like to ignore a specific violation code (such as `DOC201` and `DOC301`) in-line, you can add this comment to the function of your choice: | ||
|
||
```python | ||
def my_function( # noqa: DOC201, DOC301 | ||
arg1, | ||
arg2, | ||
) -> None: | ||
... | ||
``` | ||
|
||
If you would like to ignore certain categories of violations (such as `DOC2xx`) in-line, you can do this: | ||
|
||
```python | ||
def my_function( # noqa: DOC2 | ||
arg1, | ||
arg2, | ||
) -> None: | ||
... | ||
``` | ||
|
||
All the usage is consistent with how you would use *flake8*. Please read the official *flake8* documentation for full details: https://flake8.pycqa.org/en/latest/user/violations.html. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters