Skip to content

Some lines in PEP 723 blocks trigger ERA001 #10455

@zeevro

Description

@zeevro

Ruff (version 0.3.3) treats some lines from PEP 723 blocks as commented-out code.

Example:

# /// script
# requires-python = ">=3.11"
# dependencies = [
#   "requests<3",
#   "rich",
# ]
# ///
$ ruff check --select=ERA001 pep723.py
pep723.py:3:1: ERA001 Found commented-out code
pep723.py:6:1: ERA001 Found commented-out code
Found 2 errors.

Metadata

Metadata

Assignees

Labels

bugSomething isn't workinghelp wantedContributions especially welcomeruleImplementing or modifying a lint rule

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions