SIGN IN SIGN UP
astral-sh / ruff UNCLAIMED

An extremely fast Python linter and code formatter, written in Rust.

0 0 37 Rust

[`pyflakes`] Treat function-scope bare annotations as locals per PEP 526 (`F821`) (#21540)

## Summary

Resolves #21494 

Treat function-scope annotated variables as locals per PEP 526 ,
preventing F821 false positives.

## Test Plan

Added tests for these cases in
`crates/ruff_linter/resources/test/fixtures/pyflakes/F821_34.py`
R
Ruchir committed
7c2e9fbc83d7e0a87eea99053ec01182258b73a3
Parent: 9c6536e
Committed by GitHub <noreply@github.com> on 5/26/2026, 9:51:25 PM