Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 3 commits into from
Sep 23, 2023

Conversation

ScDor
Copy link
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
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