Skip to content

[pyflakes] Report reads before assignment when a name is assigned more than once (F823) - #30439

Open
Faxulous wants to merge 1 commit into
astral-sh:mainfrom
Faxulous:fix/f823-reassigned-local
Open

Faxulous wants to merge 1 commit into
astral-sh:mainfrom
Faxulous:fix/f823-reassigned-local

Conversation

@Faxulous

@Faxulous Faxulous commented Nov 14, 2026 •

Copy link
Copy Markdown

Summary

F823 checked a name's last binding so a second assignment would hide the read. It now checks the first, like pyflakes.

Closes #30224

Test Plan

New cases in F823.py

…ore than once (`F823`)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KSkWhQYGSMP2wwUKK79YYN

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

F823 misses a read before assignment when the function assigns the name more than once

1 participant