Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
konstin opened this issue Oct 24, 2024 · 1 comment · Fixed by #13974
Closed

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

konstin opened this issue Oct 24, 2024 · 1 comment · Fixed by #13974
Assignees
Labels
help wanted Contributions especially welcome rule Implementing or modifying a lint rule

Comments

@konstin
Copy link
Member

konstin commented Oct 24, 2024

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.

@MichaReiser MichaReiser added rule Implementing or modifying a lint rule help wanted Contributions especially welcome labels Oct 24, 2024
@charliermarsh
Copy link
Member

Good call.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Contributions especially welcome rule Implementing or modifying a lint rule
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants