mirror of
https://github.com/astral-sh/ruff.git
synced 2025-08-03 18:28:24 +00:00
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
1 changed files with 8 additions and 0 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue