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:
Amethyst Reese 2025-12-11 11:04:28 -08:00 committed by GitHub
parent 34f7a04ef7
commit 7a578ce833
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 2 deletions

View File

@ -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)