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]
Invalid examples¶
fn() # noqa
(
1,
2, # noqa
)
Show more
class C:
# noqa
...