-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Open
3 / 63 of 6 issues completedOpen
3 / 63 of 6 issues completed
Copy link
Labels
suppressionRelated to supression of violations e.g. noqaRelated to supression of violations e.g. noqa
Description
First of all, thank you so much for this tool, it's fantastic 🚀 !
I would like to request the possibility to support ignoring a block of code. To my surprise, this is a feature some people have needed as well from flake8, see SO question, though it is not supported.
In my current use case, I have a bunch of templates, that are too long, and it becomes cumbersome to add noqa to all of them.
I was wondering if adding something like this would be possible (maybe with a different syntax):
# ruff: noqa: on: E501
TEMPLATE = """
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque sit amet ligula magna. Nulla ${var1} vehicula leo, eget tincidunt leo pharetra in. Ut egestas felis et vehicula commodo. Aliquam ${var2} placerat tortor sed magna faucibus facilisis ut et mauris. Maecenas vitae sem augue. Cras egestas felis nulla, id porta nisl ${var3} vel
"""
# ruff: noqa: off: E501Suggested changes
- Add section-level suppression/ignoring of rules (ruff: noqa: on and ruff: noqa: off)
- Add scope-level suppression/ignoring of rules (matches pylint block disables)
Thanks!
andreyfedoseev, justinchuby, tekumara, rsokolovski-fincad, hauntsaninja and 187 morevivodivivodirogier-stegeman, kleinicke, arubdesu, jbcpollak, SXHRYU and 19 morerogier-stegeman, peterHoburg, jbcpollak, ethanrobv, adam-grant-hendry and 13 more
Sub-issues
Metadata
Metadata
Assignees
Labels
suppressionRelated to supression of violations e.g. noqaRelated to supression of violations e.g. noqa