diff --git a/resources/test/fixtures/E741.py b/resources/test/fixtures/E741.py index d8fcf11922..a238b578e4 100644 --- a/resources/test/fixtures/E741.py +++ b/resources/test/fixtures/E741.py @@ -70,3 +70,6 @@ try: pass except ValueError as l: pass + +if (l := 5) > 0: + pass diff --git a/src/linter.rs b/src/linter.rs index 15296ea24f..27bce8f9f3 100644 --- a/src/linter.rs +++ b/src/linter.rs @@ -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());