mirror of
https://github.com/astral-sh/ruff.git
synced 2025-09-29 05:15:12 +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,8 +1,9 @@
|
|||
use rustpython_ast::{Expr, Stmt};
|
||||
|
||||
use crate::ast::helpers;
|
||||
use crate::autofix::{fixer, fixes};
|
||||
use crate::autofix::fixer;
|
||||
use crate::check_ast::Checker;
|
||||
use crate::pyupgrade;
|
||||
use crate::pyupgrade::checks;
|
||||
|
||||
pub fn super_call_with_parameters(checker: &mut Checker, expr: &Expr, func: &Expr, args: &[Expr]) {
|
||||
|
@ -17,7 +18,9 @@ pub fn super_call_with_parameters(checker: &mut Checker, expr: &Expr, func: &Exp
|
|||
.collect();
|
||||
if let Some(mut check) = checks::super_args(scope, &parents, expr, func, args) {
|
||||
if matches!(checker.autofix, fixer::Mode::Generate | fixer::Mode::Apply) {
|
||||
if let Some(fix) = fixes::remove_super_arguments(&mut checker.locator, expr) {
|
||||
if let Some(fix) =
|
||||
pyupgrade::fixes::remove_super_arguments(&mut checker.locator, expr)
|
||||
{
|
||||
check.amend(fix);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue