[flake8-executable] Add pytest and uv run to help message for shebang-missing-python (EXE003) (#16855)

Followup to #16849 per
https://github.com/astral-sh/ruff/pull/16849#issuecomment-2737316564
This commit is contained in:
Dylan 2025-03-19 13:12:32 -05:00 committed by GitHub
parent 4ed93b4311
commit 433a342656
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 4 deletions

View file

@ -36,7 +36,7 @@ pub(crate) struct ShebangMissingPython;
impl Violation for ShebangMissingPython {
#[derive_message_formats]
fn message(&self) -> String {
"Shebang should contain `python`".to_string()
"Shebang should contain `python`, `pytest`, or `uv run`".to_string()
}
}

View file

@ -1,11 +1,9 @@
---
source: crates/ruff_linter/src/rules/flake8_executable/mod.rs
---
EXE003.py:1:1: EXE003 Shebang should contain `python`
EXE003.py:1:1: EXE003 Shebang should contain `python`, `pytest`, or `uv run`
|
1 | #!/usr/bin/bash
| ^^^^^^^^^^^^^^^ EXE003
2 | print("hello world")
|