[ruff] Also report problems for attrs dataclasses in preview mode (RUF008, RUF009) (#14327)

Co-authored-by: Alex Waygood <alex.waygood@gmail.com>
This commit is contained in:
InSync 2024-11-14 22:13:49 +07:00 committed by GitHub
parent 9a3001b571
commit d8b1afbc6e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
12 changed files with 344 additions and 51 deletions

View file

@ -1287,6 +1287,7 @@ impl<'a> SemanticModel<'a> {
"trio" => self.seen.insert(Modules::TRIO),
"typing" => self.seen.insert(Modules::TYPING),
"typing_extensions" => self.seen.insert(Modules::TYPING_EXTENSIONS),
"attr" | "attrs" => self.seen.insert(Modules::ATTRS),
_ => {}
}
}
@ -1856,6 +1857,7 @@ bitflags! {
const COPY = 1 << 22;
const MARKUPSAFE = 1 << 23;
const FLASK = 1 << 24;
const ATTRS = 1 << 25;
}
}