Skip to content

Conversation

@diceroll123
Copy link
Contributor

@diceroll123 diceroll123 commented Jan 20, 2024

Summary

add fix for if-with-same-arms / SIM114

Also preserves comments!

Test Plan

cargo test

@github-actions
Copy link
Contributor

github-actions bot commented Jan 20, 2024

ruff-ecosystem results

Linter (stable)

✅ ecosystem check detected no linter changes.

Linter (preview)

ℹ️ ecosystem check detected linter changes. (+0 -0 violations, +60 -0 fixes in 4 projects; 39 projects unchanged)

apache/airflow (+0 -0 violations, +20 -0 fixes)

ruff check --no-cache --exit-zero --preview --select ALL

- airflow/providers/common/sql/operators/sql.py:791:9: SIM114 Combine `if` branches using logical `or` operator
+ airflow/providers/common/sql/operators/sql.py:791:9: SIM114 [*] Combine `if` branches using logical `or` operator
- airflow/utils/dates.py:97:5: SIM114 Combine `if` branches using logical `or` operator
+ airflow/utils/dates.py:97:5: SIM114 [*] Combine `if` branches using logical `or` operator
- airflow/utils/task_group.py:376:17: SIM114 Combine `if` branches using logical `or` operator
+ airflow/utils/task_group.py:376:17: SIM114 [*] Combine `if` branches using logical `or` operator
- dev/breeze/src/airflow_breeze/commands/ci_commands.py:357:5: SIM114 Combine `if` branches using logical `or` operator
+ dev/breeze/src/airflow_breeze/commands/ci_commands.py:357:5: SIM114 [*] Combine `if` branches using logical `or` operator
- dev/breeze/src/airflow_breeze/commands/ci_commands.py:361:5: SIM114 Combine `if` branches using logical `or` operator
+ dev/breeze/src/airflow_breeze/commands/ci_commands.py:361:5: SIM114 [*] Combine `if` branches using logical `or` operator
- dev/breeze/src/airflow_breeze/utils/confirm.py:110:5: SIM114 Combine `if` branches using logical `or` operator
+ dev/breeze/src/airflow_breeze/utils/confirm.py:110:5: SIM114 [*] Combine `if` branches using logical `or` operator
- docs/conf.py:765:1: SIM114 Combine `if` branches using logical `or` operator
+ docs/conf.py:765:1: SIM114 [*] Combine `if` branches using logical `or` operator
- docs/conf.py:858:5: SIM114 Combine `if` branches using logical `or` operator
+ docs/conf.py:858:5: SIM114 [*] Combine `if` branches using logical `or` operator
... 4 additional changes omitted for project

bokeh/bokeh (+0 -0 violations, +6 -0 fixes)

ruff check --no-cache --exit-zero --preview --select ALL

- src/bokeh/models/plots.py:471:17: SIM114 Combine `if` branches using logical `or` operator
+ src/bokeh/models/plots.py:471:17: SIM114 [*] Combine `if` branches using logical `or` operator
- src/bokeh/models/plots.py:478:17: SIM114 Combine `if` branches using logical `or` operator
+ src/bokeh/models/plots.py:478:17: SIM114 [*] Combine `if` branches using logical `or` operator
- src/bokeh/util/serialization.py:190:5: SIM114 Combine `if` branches using logical `or` operator
+ src/bokeh/util/serialization.py:190:5: SIM114 [*] Combine `if` branches using logical `or` operator

reflex-dev/reflex (+0 -0 violations, +2 -0 fixes)

ruff check --no-cache --exit-zero --preview

- scripts/pyi_generator.py:596:13: SIM114 Combine `if` branches using logical `or` operator
+ scripts/pyi_generator.py:596:13: SIM114 [*] Combine `if` branches using logical `or` operator

zulip/zulip (+0 -0 violations, +32 -0 fixes)

ruff check --no-cache --exit-zero --preview --select ALL

- corporate/lib/stripe.py:3723:9: SIM114 Combine `if` branches using logical `or` operator
+ corporate/lib/stripe.py:3723:9: SIM114 [*] Combine `if` branches using logical `or` operator
- corporate/lib/stripe.py:4148:9: SIM114 Combine `if` branches using logical `or` operator
+ corporate/lib/stripe.py:4148:9: SIM114 [*] Combine `if` branches using logical `or` operator
- corporate/lib/stripe.py:4158:9: SIM114 Combine `if` branches using logical `or` operator
+ corporate/lib/stripe.py:4158:9: SIM114 [*] Combine `if` branches using logical `or` operator
- scripts/lib/supervisor.py:74:9: SIM114 Combine `if` branches using logical `or` operator
+ scripts/lib/supervisor.py:74:9: SIM114 [*] Combine `if` branches using logical `or` operator
- tools/droplets/cleanup.py:39:9: SIM114 Combine `if` branches using logical `or` operator
+ tools/droplets/cleanup.py:39:9: SIM114 [*] Combine `if` branches using logical `or` operator
- tools/lib/provision.py:93:1: SIM114 Combine `if` branches using logical `or` operator
+ tools/lib/provision.py:93:1: SIM114 [*] Combine `if` branches using logical `or` operator
- zerver/actions/realm_settings.py:562:5: SIM114 Combine `if` branches using logical `or` operator
+ zerver/actions/realm_settings.py:562:5: SIM114 [*] Combine `if` branches using logical `or` operator
- zerver/lib/import_realm.py:495:13: SIM114 Combine `if` branches using logical `or` operator
+ zerver/lib/import_realm.py:495:13: SIM114 [*] Combine `if` branches using logical `or` operator
- zerver/models/users.py:625:9: SIM114 Combine `if` branches using logical `or` operator
+ zerver/models/users.py:625:9: SIM114 [*] Combine `if` branches using logical `or` operator
- zerver/signals.py:56:5: SIM114 Combine `if` branches using logical `or` operator
+ zerver/signals.py:56:5: SIM114 [*] Combine `if` branches using logical `or` operator
- zerver/views/documentation.py:94:9: SIM114 Combine `if` branches using logical `or` operator
+ zerver/views/documentation.py:94:9: SIM114 [*] Combine `if` branches using logical `or` operator
- zerver/views/registration.py:545:17: SIM114 Combine `if` branches using logical `or` operator
+ zerver/views/registration.py:545:17: SIM114 [*] Combine `if` branches using logical `or` operator
- zerver/webhooks/clubhouse/view.py:102:9: SIM114 Combine `if` branches using logical `or` operator
+ zerver/webhooks/clubhouse/view.py:102:9: SIM114 [*] Combine `if` branches using logical `or` operator
... 6 additional changes omitted for project

Changes by rule (1 rules affected)

code total + violation - violation + fix - fix
SIM114 60 0 0 60 0

@diceroll123 diceroll123 changed the title [flake8-simplify] - add fix for if-with-same-arms / SIM114 [flake8-simplify] - add fix for if-with-same-arms (SIM114) Jan 21, 2024
@charliermarsh charliermarsh changed the title [flake8-simplify] - add fix for if-with-same-arms (SIM114) [flake8-simplify] Add fix for if-with-same-arms (SIM114) Jan 22, 2024
@charliermarsh charliermarsh added fixes Related to suggested fixes for violations preview Related to preview mode features labels Jan 22, 2024
@charliermarsh charliermarsh enabled auto-merge (squash) January 22, 2024 04:32
@charliermarsh charliermarsh merged commit 9c8a4d9 into astral-sh:main Jan 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fixes Related to suggested fixes for violations preview Related to preview mode features

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants