use-rattle-ignore-comment

To silence a lint warning, use rattle: ignore[rule-name] comments. The comment may be a trailing inline comment or a standalone comment line above the code. Rule names are optional, but explicitly listing one or more comma-separated rule names avoids accidentally silencing unrelated warnings. noqa is deprecated and not supported because it is shared by other Python linters and can accidentally silence warnings unexpectedly.

Message

noqa is deprecated. Use rattle: ignore[rule-name] instead.

Valid examples

# rattle: ignore[use-f-string]
"%s" % "hi"
'ab' 'cd'  # rattle: ignore[use-plus-for-string-concat]
fn()  # noqaed by another tool
fn()  # See https://example.test/noqa-policy

Invalid examples

fn() # noqa
fn() # NOQA
# flake8: noqa
fn()  # type: ignore  # noqa
Show more
(
 1,
 2,  # noqa
)
class C:
    # noqa
    ...