mirror of
https://github.com/astral-sh/ruff.git
synced 2025-07-30 08:23:53 +00:00
Allow pytest
in shebang (#2237)
This commit is contained in:
parent
a6ec2eb044
commit
3ec46f0936
1 changed files with 1 additions and 1 deletions
|
@ -20,7 +20,7 @@ impl Violation for ShebangPython {
|
|||
/// EXE003
|
||||
pub fn shebang_python(lineno: usize, shebang: &ShebangDirective) -> Option<Diagnostic> {
|
||||
if let ShebangDirective::Match(_, start, end, content) = shebang {
|
||||
if content.contains("python") {
|
||||
if content.contains("python") || content.contains("pytest") {
|
||||
None
|
||||
} else {
|
||||
let diagnostic = Diagnostic::new(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue