Enable customization of autofixable error codes (#811)

This commit is contained in:
Charlie Marsh 2022-11-18 18:49:13 -05:00 committed by GitHub
parent 437b6f23b9
commit 0f34cdb7a3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
34 changed files with 312 additions and 228 deletions

View file

@ -14,7 +14,7 @@ pub fn useless_object_inheritance(
) {
let scope = checker.current_scope();
if let Some(mut check) = checks::useless_object_inheritance(name, bases, scope) {
if checker.patch() {
if checker.patch(check.kind.code()) {
if let Some(fix) = pyupgrade::fixes::remove_class_def_base(
checker.locator,
&stmt.location,