Skip to content

INP001: Skip files with PEP 723 inline script metadata #13912

@konstin

Description

@konstin

I have a single Python file in a directory with a PEP 723 inline script header at the top of the file:

# /// script
# requires-python = ">=3.12"
# dependencies = [
#     "httpx>=0.27.2,<0.28",
#     "packaging>=24.1,<25",
# ]
# ///

Similar to #8690, INP001 should skip such files: They are not meant to be imported, but meant to be run as standalone scripts with uv run folder/my_script.py or pipx run folder/my_script.py.

Metadata

Metadata

Assignees

Labels

help 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