mirror of https://github.com/astral-sh/ruff
Add test case for assignment expression in `E741.py` (#168)
This commit is contained in:
parent
4e0807e908
commit
825777edc1
|
|
@ -70,3 +70,6 @@ try:
|
||||||
pass
|
pass
|
||||||
except ValueError as l:
|
except ValueError as l:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
if (l := 5) > 0:
|
||||||
|
pass
|
||||||
|
|
|
||||||
|
|
@ -431,6 +431,11 @@ mod tests {
|
||||||
location: Location::new(71, 1),
|
location: Location::new(71, 1),
|
||||||
fix: None,
|
fix: None,
|
||||||
},
|
},
|
||||||
|
Check {
|
||||||
|
kind: CheckKind::AmbiguousVariableName("l".to_string()),
|
||||||
|
location: Location::new(74, 5),
|
||||||
|
fix: None,
|
||||||
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
assert_eq!(actual.len(), expected.len());
|
assert_eq!(actual.len(), expected.len());
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue