From 208bf2915f58d36783eb53bf7bc99d79620ac04f Mon Sep 17 00:00:00 2001 From: Charlie Marsh Date: Tue, 16 Jan 2024 15:16:49 -0500 Subject: [PATCH] Add instructions on using noqa with isort rules --- docs/linter.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/docs/linter.md b/docs/linter.md index 5594789dad49f..39b0d73bbd32b 100644 --- a/docs/linter.md +++ b/docs/linter.md @@ -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: