Skip to content

SIM911: Avoid using zip(dict.keys(), dict.values())#183

Merged
MartinThoma merged 3 commits intoMartinThoma:masterfrom
ScDor:SIM911
Sep 23, 2023
Merged

SIM911: Avoid using zip(dict.keys(), dict.values())#183
MartinThoma merged 3 commits intoMartinThoma:masterfrom
ScDor:SIM911

Conversation

@ScDor
Copy link
Copy Markdown
Contributor

@ScDor ScDor commented May 19, 2023

closes: #161

@ScDor ScDor marked this pull request as ready for review May 19, 2023 11:29
@MartinThoma MartinThoma changed the title SIM911 SIM911: Avoid using zip(dict.keys(), dict.values()) Sep 23, 2023
@MartinThoma MartinThoma merged commit 9f7134b into MartinThoma:master Sep 23, 2023
@MartinThoma
Copy link
Copy Markdown
Owner

Thank you 🙏

@ScDor ScDor deleted the SIM911 branch September 30, 2023 15:23
charliermarsh pushed a commit to astral-sh/ruff that referenced this pull request Jan 11, 2024
## Summary

Closes #9319, implements the [`SIM911` rule from
`flake8-simplify`](MartinThoma/flake8-simplify#183).


#### Note
I wasn't sure whether or not to include
```rs
if checker.settings.preview.is_disabled() {
    return;
}
```
at the beginning of the function with violation logic if the rule's
already declared as part of `RuleGroup::Preview`.
I've seen both variants, so I'd appreciate some feedback on that :)
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.

[New Rule] replace zip(d.keys(), d.values()) with d.items()

2 participants