-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Closed
Labels
bugSomething isn't workingSomething isn't workinghelp wantedContributions especially welcomeContributions especially welcome
Description
This code:
#!/usr/bin/env python3
# /// script
# requires-python = ">=3.12"
# dependencies = [
# "rich-click",
# "imagehash",
# ]
# ///
#
# Bla bla bla
#
# $ ruff check --select ALL --ignore A001,D200,D203,D212 phototool
"""
Do important things.
"""
print(__doc__)when checked via ruff check --select ERA001 incorrectly flags:
test.py:4:1: ERA001 Found commented-out code
|
2 | # /// script
3 | # requires-python = ">=3.12"
4 | # dependencies = [
| ^^^^^^^^^^^^^^^^^^ ERA001
5 | # "rich-click",
6 | # "imagehash",
|
= help: Remove commented-out code
test.py:7:1: ERA001 Found commented-out code
|
5 | # "rich-click",
6 | # "imagehash",
7 | # ]
| ^^^ ERA001
8 | # ///
9 | #
|
= help: Remove commented-out code
There are one or two other ERA001 issues open but perhaps this one is narrowly scoped in that ISTM maybe "never flag ERA001 inside an inline script block" might be an isolateable fix.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workinghelp wantedContributions especially welcomeContributions especially welcome