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

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

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

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

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