Add test case for assignment expression in `E741.py` (#168)

This commit is contained in:
Harutaka Kawamura 2022-09-12 22:03:36 +09:00 committed by GitHub
parent 4e0807e908
commit 825777edc1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 0 deletions

View File

@ -70,3 +70,6 @@ try:
pass
except ValueError as l:
pass
if (l := 5) > 0:
pass

View File

@ -431,6 +431,11 @@ mod tests {
location: Location::new(71, 1),
fix: None,
},
Check {
kind: CheckKind::AmbiguousVariableName("l".to_string()),
location: Location::new(74, 5),
fix: None,
},
];
assert_eq!(actual.len(), expected.len());