mirror of
https://github.com/astral-sh/ruff.git
synced 2025-10-02 06:42:02 +00:00
Avoid missing namespace violations in scripts with shebangs (#8710)
## Summary I think it's reasonable to avoid raising `INP001` for scripts, and shebangs are one sufficient way to detect scripts. Closes https://github.com/astral-sh/ruff/issues/8690.
This commit is contained in:
parent
d1e88dc984
commit
6d5d079a18
9 changed files with 48 additions and 40 deletions
|
@ -117,7 +117,7 @@ pub fn check_path(
|
|||
.iter_enabled()
|
||||
.any(|rule_code| rule_code.lint_source().is_filesystem())
|
||||
{
|
||||
diagnostics.extend(check_file_path(path, package, settings));
|
||||
diagnostics.extend(check_file_path(path, package, locator, indexer, settings));
|
||||
}
|
||||
|
||||
// Run the logical line-based rules.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue