---
source: crates/ruff_linter/src/rules/flake8_simplify/mod.rs
---
SIM109 [*] Use `a in (b, c)` instead of multiple equality comparisons
 --> SIM109.py:2:4
  |
1 | # SIM109
2 | if a == b or a == c:
  |    ^^^^^^^^^^^^^^^^
3 |     d
  |
help: Replace with `a in (b, c)`
  |
1 | # SIM109
  - if a == b or a == c:
2 + if a in (b, c):
3 |     d
  |
note: This is an unsafe fix and may change runtime behavior

SIM109 [*] Use `a in (b, c)` instead of multiple equality comparisons
 --> SIM109.py:6:5
  |
5 | # SIM109
6 | if (a == b or a == c) and None:
  |     ^^^^^^^^^^^^^^^^
7 |     d
  |
help: Replace with `a in (b, c)`
  |
5 | # SIM109
  - if (a == b or a == c) and None:
6 + if (a in (b, c)) and None:
7 |     d
  |
note: This is an unsafe fix and may change runtime behavior

SIM109 [*] Use `a in (b, c)` instead of multiple equality comparisons
  --> SIM109.py:10:4
   |
 9 | # SIM109
10 | if a == b or a == c or None:
   |    ^^^^^^^^^^^^^^^^^^^^^^^^
11 |     d
   |
help: Replace with `a in (b, c)`
   |
9  | # SIM109
   - if a == b or a == c or None:
10 + if a in (b, c) or None:
11 |     d
   |
note: This is an unsafe fix and may change runtime behavior

SIM109 [*] Use `a in (b, c)` instead of multiple equality comparisons
  --> SIM109.py:14:4
   |
13 | # SIM109
14 | if a == b or None or a == c:
   |    ^^^^^^^^^^^^^^^^^^^^^^^^
15 |     d
   |
help: Replace with `a in (b, c)`
   |
13 | # SIM109
   - if a == b or None or a == c:
14 + if a in (b, c) or None:
15 |     d
   |
note: This is an unsafe fix and may change runtime behavior
