mirror of
https://github.com/astral-sh/ruff.git
synced 2025-09-29 13:25:17 +00:00
Use lazy initialization for SourceCodeLocator (#472)
This commit is contained in:
parent
2679db1d10
commit
4beea0484a
19 changed files with 112 additions and 94 deletions
|
@ -16,9 +16,9 @@ pub fn super_call_with_parameters(checker: &mut Checker, expr: &Expr, func: &Exp
|
|||
.map(|index| checker.parents[*index])
|
||||
.collect();
|
||||
if let Some(mut check) = checks::super_args(scope, &parents, expr, func, args) {
|
||||
if checker.autofix.enabled() {
|
||||
if checker.patch() {
|
||||
if let Some(fix) =
|
||||
pyupgrade::fixes::remove_super_arguments(&mut checker.locator, expr)
|
||||
pyupgrade::fixes::remove_super_arguments(checker.get_locator(), expr)
|
||||
{
|
||||
check.amend(fix);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue