mirror of https://github.com/astral-sh/ruff
Add instructions on using `noqa` with isort rules (#9555)
Closes https://github.com/astral-sh/ruff/issues/9554.
This commit is contained in:
parent
f426c0fdaf
commit
8788d57030
|
|
@ -304,6 +304,14 @@ Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor.
|
|||
""" # noqa: E501
|
||||
```
|
||||
|
||||
For import sorting, the `noqa` should come at the end of the first line in the import block, and
|
||||
will apply to all imports in the block, like so:
|
||||
|
||||
```python
|
||||
import os # noqa: I100
|
||||
import abc
|
||||
```
|
||||
|
||||
To ignore all violations across an entire file, add the line `# ruff: noqa` anywhere in the file,
|
||||
preferably towards the top, like so:
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue