-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Closed
Labels
questionAsking for support or clarificationAsking for support or clarification
Description
Ruff version ruff 0.0.271.
pyproject.toml:
[tool.ruff]
select = ["ALL"]
test.py:
"""Module to test ruff ignores."""
print("test")
a = 20 # TODOCommand run: ruff . in project directory.
Output seen:
test.py:2:1: T201 `print` found
test.py:3:11: TD002 Missing author in TODO; try: `# TODO(<author_name>): ...`
test.py:3:11: TD004 Missing colon in TODO
test.py:3:11: TD005 Missing issue description after `TODO`
test.py:3:11: TD003 Missing issue link on the line following this TODO
test.py:3:11: T002 Line contains TODO
This is fine. Now we add ignore = ["T20"] to the toml file. Output seen:
test.py:3:11: TD002 Missing author in TODO; try: `# TODO(<author_name>): ...`
test.py:3:11: TD004 Missing colon in TODO
test.py:3:11: TD005 Missing issue description after `TODO`
test.py:3:11: TD003 Missing issue link on the line following this TODO
test.py:3:11: T002 Line contains TODO
This is also fine. But if we change it to ignore = ["T"], we see:
test.py:3:11: TD002 Missing author in TODO; try: `# TODO(<author_name>): ...`
test.py:3:11: TD004 Missing colon in TODO
test.py:3:11: TD005 Missing issue description after `TODO`
test.py:3:11: TD003 Missing issue link on the line following this TODO
test.py:3:11: T002 Line contains TODO
Instead we should be seeing:
test.py:2:1: T201 `print` found
test.py:3:11: TD002 Missing author in TODO; try: `# TODO(<author_name>): ...`
test.py:3:11: TD004 Missing colon in TODO
test.py:3:11: TD005 Missing issue description after `TODO`
test.py:3:11: TD003 Missing issue link on the line following this TODO
Ruff is confusing T and T20.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
questionAsking for support or clarificationAsking for support or clarification