ruff
6f23bdb7 - Generalize PIE807 to handle dict literals (#8608)

Commit
1 year ago
Generalize PIE807 to handle dict literals (#8608) ## Summary PIE807 will rewrite `lambda: []` to `list` -- AFAICT though, the same rationale also applies to dicts, so I've modified the code to also rewrite `lambda: {}` to `dict`. Two things I'm not sure about: * Should this go to a new rule? This no longer actually matches the behavior of flake8-pie, and while I think thematically it makes sense to be part of the same rule, we could make it a standalone rule (but if so, where should I put it and what error code should I use)? * If we want a single rule, are there backwards compatibility concerns with the rule name change (from `reimplemented_list_builtin` to `reimplemented_container_builtin`? ## Test Plan Added snapshot tests of the functionality.
Author
Parents
Loading