add autofix for PLR1714#7910
Merged
charliermarsh merged 4 commits intoastral-sh:mainfrom Oct 11, 2023
Merged
Conversation
Contributor
PR Check ResultsEcosystemℹ️ ecosystem check detected changes. (+5, -5, 0 error(s)) airflow (+1, -1)
- [*] 16031 fixable with the `--fix` option (6314 hidden fixes can be enabled with the `--unsafe-fixes` option). + [*] 16031 fixable with the `--fix` option (6330 hidden fixes can be enabled with the `--unsafe-fixes` option). aws-sam-cli (+1, -1)
- [*] 756 fixable with the `--fix` option (121 hidden fixes can be enabled with the `--unsafe-fixes` option). + [*] 756 fixable with the `--fix` option (122 hidden fixes can be enabled with the `--unsafe-fixes` option). bokeh (+1, -1)
- [*] 17800 fixable with the `--fix` option (4721 hidden fixes can be enabled with the `--unsafe-fixes` option). + [*] 17800 fixable with the `--fix` option (4727 hidden fixes can be enabled with the `--unsafe-fixes` option). securedrop (+1, -1)
- [*] 48 fixable with the `--fix` option (1 hidden fix can be enabled with the `--unsafe-fixes` option). + [*] 48 fixable with the `--fix` option (3 hidden fixes can be enabled with the `--unsafe-fixes` option). pymilvus (+1, -1)
- [*] 233 fixable with the `--fix` option (129 hidden fixes can be enabled with the `--unsafe-fixes` option). + [*] 233 fixable with the `--fix` option (132 hidden fixes can be enabled with the `--unsafe-fixes` option). |
konstin
approved these changes
Oct 11, 2023
crates/ruff_linter/src/rules/pylint/rules/repeated_equality_comparison.rs
Outdated
Show resolved
Hide resolved
…mparison.rs Co-authored-by: konsti <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add autofix for
PLR1714using tuples.If added complexity is desired, we can lean into the
setpart by doing some kind of builtin check on all of the comparator elements for starters, since we otherwise don't know if something's hashable.Test Plan
cargo test, and manually.