mirror of https://github.com/astral-sh/ruff
Ignore ruff:isort like ruff:noqa in new suppressions (#21922)
## Summary Ignores `#ruff:isort` when parsing suppressions similar to `#ruff:noqa`. Should clear up ecosystem issues in #21908 ## Test Plan cargo tests
This commit is contained in:
parent
34f7a04ef7
commit
7a578ce833
|
|
@ -490,8 +490,10 @@ impl<'src> SuppressionParser<'src> {
|
|||
} else if self.cursor.as_str().starts_with("enable") {
|
||||
self.cursor.skip_bytes("enable".len());
|
||||
Ok(SuppressionAction::Enable)
|
||||
} else if self.cursor.as_str().starts_with("noqa") {
|
||||
// file-level "noqa" variant, ignore for now
|
||||
} else if self.cursor.as_str().starts_with("noqa")
|
||||
|| self.cursor.as_str().starts_with("isort")
|
||||
{
|
||||
// alternate suppression variants, ignore for now
|
||||
self.error(ParseErrorKind::NotASuppression)
|
||||
} else {
|
||||
self.error(ParseErrorKind::UnknownAction)
|
||||
|
|
|
|||
Loading…
Reference in New Issue