---
source: crates/ruff_linter/src/rules/pyflakes/mod.rs
---
F841 [*] Local variable `x` is assigned to but never used
 --> <filename>:7:26
  |
5 |     try:
6 |         1 / 0
7 |     except ValueError as x:
  |                          ^
8 |         pass
9 |     except ImportError as x:
  |
help: Remove assignment to unused variable `x`
  |
6 |         1 / 0
  -     except ValueError as x:
7 +     except ValueError:
8 |         pass
  |

F841 [*] Local variable `x` is assigned to but never used
  --> <filename>:9:27
   |
 7 |     except ValueError as x:
 8 |         pass
 9 |     except ImportError as x:
   |                           ^
10 |         pass
   |
help: Remove assignment to unused variable `x`
   |
8  |         pass
   -     except ImportError as x:
9  +     except ImportError:
10 |         pass
   |
