mirror of
https://github.com/astral-sh/ruff.git
synced 2025-09-30 13:51:37 +00:00
Handle E731 in type-annotated assignment (#116)
This commit is contained in:
parent
1ad6be7196
commit
74ecdc73ac
3 changed files with 32 additions and 6 deletions
|
@ -268,11 +268,18 @@ mod tests {
|
|||
},
|
||||
&autofix::Mode::Generate,
|
||||
)?;
|
||||
let expected = vec![Check {
|
||||
kind: CheckKind::DoNotAssignLambda,
|
||||
location: Location::new(1, 1),
|
||||
fix: None,
|
||||
}];
|
||||
let expected = vec![
|
||||
Check {
|
||||
kind: CheckKind::DoNotAssignLambda,
|
||||
location: Location::new(3, 1),
|
||||
fix: None,
|
||||
},
|
||||
Check {
|
||||
kind: CheckKind::DoNotAssignLambda,
|
||||
location: Location::new(5, 1),
|
||||
fix: None,
|
||||
},
|
||||
];
|
||||
|
||||
assert_eq!(actual.len(), expected.len());
|
||||
for i in 0..actual.len() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue