---
source: crates/ruff_linter/src/rules/pyflakes/mod.rs
---
F823 Local variable `my_var` referenced before assignment
 --> F823.py:6:5
  |
5 | def foo():
6 |     my_var += 1
  |     ^^^^^^
  |

F823 Local variable `my_var` referenced before assignment
  --> F823.py:32:15
   |
30 | class Class:
31 |     def f(self):
32 |         print(my_var)
   |               ^^^^^^
33 |         my_var = 1
   |

F823 Local variable `my_var` referenced before assignment
  --> F823.py:40:15
   |
39 |     def f(self):
40 |         print(my_var)
   |               ^^^^^^
41 |         my_var = 1
   |

F823 Local variable `sys` referenced before assignment
  --> F823.py:48:11
   |
47 | def main():
48 |     print(sys.argv)
   |           ^^^
49 |
50 |     try:
   |

F823 Local variable `sys` referenced before assignment
  --> F823.py:62:11
   |
61 | def main():
62 |     print(sys.argv)
   |           ^^^
63 |
64 |     for sys in range(5):
   |
