Skip to content

B909: check annotated subscript assignments - #647

Open
umrndem wants to merge 1 commit into
PyCQA:mainfrom
umrndem:fix/b909-annotated-subscript-assignment
Open

umrndem wants to merge 1 commit into
PyCQA:mainfrom
umrndem:fix/b909-annotated-subscript-assignment

Conversation

@umrndem

@umrndem umrndem commented Nov 19, 2026

Copy link
Copy Markdown
Contributor

B909 checks subscript writes during iteration, but it missed the same write with a type annotation. This uses the existing check for both forms. Annotation-only statements and writes to the current dictionary key keep their existing behavior.

The regression cases cover annotated writes, the current key, annotation-only statements, and a write followed by a break. The full tox matrix and pre-commit checks passed.

Refs #454.

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.

1 participant