mirror of
https://github.com/astral-sh/ruff.git
synced 2025-10-01 14:21:53 +00:00
Break up autofix/fixes.rs (#449)
This commit is contained in:
parent
206e6463be
commit
583149a472
13 changed files with 400 additions and 384 deletions
|
@ -1,7 +1,8 @@
|
|||
use rustpython_ast::{Expr, Keyword, Stmt};
|
||||
|
||||
use crate::autofix::{fixer, fixes};
|
||||
use crate::autofix::fixer;
|
||||
use crate::check_ast::Checker;
|
||||
use crate::pyupgrade;
|
||||
use crate::pyupgrade::checks;
|
||||
|
||||
pub fn useless_object_inheritance(
|
||||
|
@ -14,7 +15,7 @@ pub fn useless_object_inheritance(
|
|||
let scope = checker.current_scope();
|
||||
if let Some(mut check) = checks::useless_object_inheritance(name, bases, scope) {
|
||||
if matches!(checker.autofix, fixer::Mode::Generate | fixer::Mode::Apply) {
|
||||
if let Some(fix) = fixes::remove_class_def_base(
|
||||
if let Some(fix) = pyupgrade::fixes::remove_class_def_base(
|
||||
&mut checker.locator,
|
||||
&stmt.location,
|
||||
check.location,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue