Update RustPython to get main versions of end_location etc. (#445)

This commit is contained in:
Charlie Marsh 2022-10-17 11:52:40 -04:00 committed by GitHub
parent cf0d198365
commit edefa5219c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 34 additions and 35 deletions

View file

@ -1,7 +1,7 @@
use std::collections::BTreeMap;
use once_cell::sync::Lazy;
use rustpython_ast::{Expr, ExprKind, Location};
use rustpython_ast::{Expr, ExprKind};
use crate::ast::types::Range;
use crate::autofix::fixer;
@ -40,11 +40,8 @@ pub fn deprecated_unittest_alias(checker: &mut Checker, expr: &Expr) {
if matches!(checker.autofix, fixer::Mode::Generate | fixer::Mode::Apply) {
check.amend(Fix {
content: format!("self.{}", target),
location: Location::new(expr.location.row(), expr.location.column()),
end_location: Location::new(
expr.end_location.row(),
expr.end_location.column(),
),
location: expr.location,
end_location: expr.end_location.unwrap(),
applied: false,
});
}