diff options
| author | Anthony Sottile <asottile@umich.edu> | 2020-01-16 22:58:19 +0000 |
|---|---|---|
| committer | Anthony Sottile <asottile@umich.edu> | 2020-01-16 22:58:19 +0000 |
| commit | 6223dd8ab7b268537164cb3d76bec21ea57fefb9 (patch) | |
| tree | 493e411bc1ef2b6810126a8e18d8ce3d322a8108 /docs/source/user | |
| parent | 8f9f2813c3cde29703d8ec95b64fac0466037801 (diff) | |
| parent | b3f54c3f127611161c7175561f8e78302bee5ab0 (diff) | |
| download | flake8-6223dd8ab7b268537164cb3d76bec21ea57fefb9.tar.gz | |
Merge branch 'document_before_after' into 'master'
document that contents may appear before/after a noqa comment
Closes #528
See merge request pycqa/flake8!407
Diffstat (limited to 'docs/source/user')
| -rw-r--r-- | docs/source/user/violations.rst | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/docs/source/user/violations.rst b/docs/source/user/violations.rst index a511bdc..8681276 100644 --- a/docs/source/user/violations.rst +++ b/docs/source/user/violations.rst @@ -103,6 +103,17 @@ list all of the errors with commas separating them: Finally, if we have a particularly bad line of code, we can ignore every error using simply ``# noqa`` with nothing after it. +Contents before and after the ``# noqa: ...`` portion are ignored so multiple +comments may appear on one line. Here are several examples: + +.. code-block:: python + + # mypy requires `# type: ignore` to appear first + x = 5 # type: ignore # noqa: ABC123 + + # can use to add useful user information to a noqa comment + y = 6 # noqa: ABC456 # TODO: will fix this later + Ignoring Entire Files --------------------- |
