Skip to content

[flake8-simplify] SIM910/SIM911 false negative if variable is named dict #18777

@MeGaGiGaGon

Description

@MeGaGiGaGon

Summary

SIM911 has a false negative if the dict is named dict playground

PS ~\Desktop\New_folder>Get-Content issue.py
dict = {}
for country, stars in zip(dict.keys(), dict.values()):...
PS ~\Desktop\New_folder>uvx ruff check issue.py --isolated --select SIM
All checks passed!

This also applies to SIM910 playground

Version

ruff 0.12.0 (87f0feb 2025-06-17) + playground

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions