---
source: crates/ruff_linter/src/rules/flake8_simplify/mod.rs
---
SIM222 [*] Use `True` instead of `... or True`
 --> SIM222.py:1:4
  |
1 | if a or True:  # SIM222
  |    ^^^^^^^^^
2 |     pass
  |
help: Replace with `True`
  |
  - if a or True:  # SIM222
1 + if True:  # SIM222
2 |     pass
  |
note: This is an unsafe fix and may change runtime behavior

SIM222 [*] Use `True` instead of `... or True`
 --> SIM222.py:4:4
  |
2 |     pass
3 |
4 | if (a or b) or True:  # SIM222
  |    ^^^^^^^^^^^^^^^^
5 |     pass
  |
help: Replace with `True`
  |
3 |
  - if (a or b) or True:  # SIM222
4 + if True:  # SIM222
5 |     pass
  |
note: This is an unsafe fix and may change runtime behavior

SIM222 [*] Use `True` instead of `... or True`
 --> SIM222.py:7:10
  |
5 |     pass
6 |
7 | if a or (b or True):  # SIM222
  |          ^^^^^^^^^
8 |     pass
  |
help: Replace with `True`
  |
6 |
  - if a or (b or True):  # SIM222
7 + if a or (True):  # SIM222
8 |     pass
  |
note: This is an unsafe fix and may change runtime behavior

SIM222 [*] Use `True` instead of `True or ...`
  --> SIM222.py:24:16
   |
22 |     pass
23 |
24 | if a or f() or True or g() or b:  # SIM222
   |                ^^^^^^^^^^^^^^^^
25 |     pass
   |
help: Replace with `True`
   |
23 |
   - if a or f() or True or g() or b:  # SIM222
24 + if a or f() or True:  # SIM222
25 |     pass
   |
note: This is an unsafe fix and may change runtime behavior

SIM222 [*] Use `True` instead of `True or ...`
  --> SIM222.py:27:4
   |
25 |     pass
26 |
27 | if True or f() or a or g() or b:  # SIM222
   |    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
28 |     pass
   |
help: Replace with `True`
   |
26 |
   - if True or f() or a or g() or b:  # SIM222
27 + if True:  # SIM222
28 |     pass
   |
note: This is an unsafe fix and may change runtime behavior

SIM222 [*] Use `True` instead of `... or True or ...`
  --> SIM222.py:30:4
   |
28 |     pass
29 |
30 | if a or True or f() or b or g():  # SIM222
   |    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
31 |     pass
   |
help: Replace with `True`
   |
29 |
   - if a or True or f() or b or g():  # SIM222
30 + if True:  # SIM222
31 |     pass
   |
note: This is an unsafe fix and may change runtime behavior

SIM222 [*] Use `True` instead of `... or True`
  --> SIM222.py:47:6
   |
47 | a or "" or True  # SIM222
   |      ^^^^^^^^^^
48 |
49 | a or "foo" or True or "bar"  # SIM222
   |
help: Replace with `True`
   |
46 |
   - a or "" or True  # SIM222
47 + a or True  # SIM222
48 |
   |
note: This is an unsafe fix and may change runtime behavior

SIM222 [*] Use `"foo"` instead of `"foo" or ...`
  --> SIM222.py:49:6
   |
47 | a or "" or True  # SIM222
48 |
49 | a or "foo" or True or "bar"  # SIM222
   |      ^^^^^^^^^^^^^^^^^^^^^^
50 |
51 | a or 0 or True  # SIM222
   |
help: Replace with `"foo"`
   |
48 |
   - a or "foo" or True or "bar"  # SIM222
49 + a or "foo"  # SIM222
50 |
   |
note: This is an unsafe fix and may change runtime behavior

SIM222 [*] Use `True` instead of `... or True`
  --> SIM222.py:51:6
   |
49 | a or "foo" or True or "bar"  # SIM222
50 |
51 | a or 0 or True  # SIM222
   |      ^^^^^^^^^
52 |
53 | a or 1 or True or 2  # SIM222
   |
help: Replace with `True`
   |
50 |
   - a or 0 or True  # SIM222
51 + a or True  # SIM222
52 |
   |
note: This is an unsafe fix and may change runtime behavior

SIM222 [*] Use `1` instead of `1 or ...`
  --> SIM222.py:53:6
   |
51 | a or 0 or True  # SIM222
52 |
53 | a or 1 or True or 2  # SIM222
   |      ^^^^^^^^^^^^^^
54 |
55 | a or 0.0 or True  # SIM222
   |
help: Replace with `1`
   |
52 |
   - a or 1 or True or 2  # SIM222
53 + a or 1  # SIM222
54 |
   |
note: This is an unsafe fix and may change runtime behavior

SIM222 [*] Use `True` instead of `... or True`
  --> SIM222.py:55:6
   |
53 | a or 1 or True or 2  # SIM222
54 |
55 | a or 0.0 or True  # SIM222
   |      ^^^^^^^^^^^
56 |
57 | a or 0.1 or True or 0.2  # SIM222
   |
help: Replace with `True`
   |
54 |
   - a or 0.0 or True  # SIM222
55 + a or True  # SIM222
56 |
   |
note: This is an unsafe fix and may change runtime behavior

SIM222 [*] Use `0.1` instead of `0.1 or ...`
  --> SIM222.py:57:6
   |
55 | a or 0.0 or True  # SIM222
56 |
57 | a or 0.1 or True or 0.2  # SIM222
   |      ^^^^^^^^^^^^^^^^^^
58 |
59 | a or [] or True  # SIM222
   |
help: Replace with `0.1`
   |
56 |
   - a or 0.1 or True or 0.2  # SIM222
57 + a or 0.1  # SIM222
58 |
   |
note: This is an unsafe fix and may change runtime behavior

SIM222 [*] Use `True` instead of `... or True`
  --> SIM222.py:59:6
   |
57 | a or 0.1 or True or 0.2  # SIM222
58 |
59 | a or [] or True  # SIM222
   |      ^^^^^^^^^^
60 |
61 | a or list([]) or True  # SIM222
   |
help: Replace with `True`
   |
58 |
   - a or [] or True  # SIM222
59 + a or True  # SIM222
60 |
   |
note: This is an unsafe fix and may change runtime behavior

SIM222 [*] Use `True` instead of `... or True`
  --> SIM222.py:61:6
   |
59 | a or [] or True  # SIM222
60 |
61 | a or list([]) or True  # SIM222
   |      ^^^^^^^^^^^^^^^^
62 |
63 | a or [1] or True or [2]  # SIM222
   |
help: Replace with `True`
   |
60 |
   - a or list([]) or True  # SIM222
61 + a or True  # SIM222
62 |
   |
note: This is an unsafe fix and may change runtime behavior

SIM222 [*] Use `[1]` instead of `[1] or ...`
  --> SIM222.py:63:6
   |
61 | a or list([]) or True  # SIM222
62 |
63 | a or [1] or True or [2]  # SIM222
   |      ^^^^^^^^^^^^^^^^^^
64 |
65 | a or list([1]) or True or list([2])  # SIM222
   |
help: Replace with `[1]`
   |
62 |
   - a or [1] or True or [2]  # SIM222
63 + a or [1]  # SIM222
64 |
   |
note: This is an unsafe fix and may change runtime behavior

SIM222 [*] Use `list([1])` instead of `list([1]) or ...`
  --> SIM222.py:65:6
   |
63 | a or [1] or True or [2]  # SIM222
64 |
65 | a or list([1]) or True or list([2])  # SIM222
   |      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
66 |
67 | a or {} or True  # SIM222
   |
help: Replace with `list([1])`
   |
64 |
   - a or list([1]) or True or list([2])  # SIM222
65 + a or list([1])  # SIM222
66 |
   |
note: This is an unsafe fix and may change runtime behavior

SIM222 [*] Use `True` instead of `... or True`
  --> SIM222.py:67:6
   |
65 | a or list([1]) or True or list([2])  # SIM222
66 |
67 | a or {} or True  # SIM222
   |      ^^^^^^^^^^
68 |
69 | a or dict() or True  # SIM222
   |
help: Replace with `True`
   |
66 |
   - a or {} or True  # SIM222
67 + a or True  # SIM222
68 |
   |
note: This is an unsafe fix and may change runtime behavior

SIM222 [*] Use `True` instead of `... or True`
  --> SIM222.py:69:6
   |
67 | a or {} or True  # SIM222
68 |
69 | a or dict() or True  # SIM222
   |      ^^^^^^^^^^^^^^
70 |
71 | a or {1: 1} or True or {2: 2}  # SIM222
   |
help: Replace with `True`
   |
68 |
   - a or dict() or True  # SIM222
69 + a or True  # SIM222
70 |
   |
note: This is an unsafe fix and may change runtime behavior

SIM222 [*] Use `{1: 1}` instead of `{1: 1} or ...`
  --> SIM222.py:71:6
   |
69 | a or dict() or True  # SIM222
70 |
71 | a or {1: 1} or True or {2: 2}  # SIM222
   |      ^^^^^^^^^^^^^^^^^^^^^^^^
72 |
73 | a or dict({1: 1}) or True or dict({2: 2})  # SIM222
   |
help: Replace with `{1: 1}`
   |
70 |
   - a or {1: 1} or True or {2: 2}  # SIM222
71 + a or {1: 1}  # SIM222
72 |
   |
note: This is an unsafe fix and may change runtime behavior

SIM222 [*] Use `dict({1: 1})` instead of `dict({1: 1}) or ...`
  --> SIM222.py:73:6
   |
71 | a or {1: 1} or True or {2: 2}  # SIM222
72 |
73 | a or dict({1: 1}) or True or dict({2: 2})  # SIM222
   |      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
74 |
75 | a or set() or True  # SIM222
   |
help: Replace with `dict({1: 1})`
   |
72 |
   - a or dict({1: 1}) or True or dict({2: 2})  # SIM222
73 + a or dict({1: 1})  # SIM222
74 |
   |
note: This is an unsafe fix and may change runtime behavior

SIM222 [*] Use `True` instead of `... or True`
  --> SIM222.py:75:6
   |
73 | a or dict({1: 1}) or True or dict({2: 2})  # SIM222
74 |
75 | a or set() or True  # SIM222
   |      ^^^^^^^^^^^^^
76 |
77 | a or set(set()) or True  # SIM222
   |
help: Replace with `True`
   |
74 |
   - a or set() or True  # SIM222
75 + a or True  # SIM222
76 |
   |
note: This is an unsafe fix and may change runtime behavior

SIM222 [*] Use `True` instead of `... or True`
  --> SIM222.py:77:6
   |
75 | a or set() or True  # SIM222
76 |
77 | a or set(set()) or True  # SIM222
   |      ^^^^^^^^^^^^^^^^^^
78 |
79 | a or {1} or True or {2}  # SIM222
   |
help: Replace with `True`
   |
76 |
   - a or set(set()) or True  # SIM222
77 + a or True  # SIM222
78 |
   |
note: This is an unsafe fix and may change runtime behavior

SIM222 [*] Use `{1}` instead of `{1} or ...`
  --> SIM222.py:79:6
   |
77 | a or set(set()) or True  # SIM222
78 |
79 | a or {1} or True or {2}  # SIM222
   |      ^^^^^^^^^^^^^^^^^^
80 |
81 | a or set({1}) or True or set({2})  # SIM222
   |
help: Replace with `{1}`
   |
78 |
   - a or {1} or True or {2}  # SIM222
79 + a or {1}  # SIM222
80 |
   |
note: This is an unsafe fix and may change runtime behavior

SIM222 [*] Use `set({1})` instead of `set({1}) or ...`
  --> SIM222.py:81:6
   |
79 | a or {1} or True or {2}  # SIM222
80 |
81 | a or set({1}) or True or set({2})  # SIM222
   |      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
82 |
83 | a or () or True  # SIM222
   |
help: Replace with `set({1})`
   |
80 |
   - a or set({1}) or True or set({2})  # SIM222
81 + a or set({1})  # SIM222
82 |
   |
note: This is an unsafe fix and may change runtime behavior

SIM222 [*] Use `True` instead of `... or True`
  --> SIM222.py:83:6
   |
81 | a or set({1}) or True or set({2})  # SIM222
82 |
83 | a or () or True  # SIM222
   |      ^^^^^^^^^^
84 |
85 | a or tuple(()) or True  # SIM222
   |
help: Replace with `True`
   |
82 |
   - a or () or True  # SIM222
83 + a or True  # SIM222
84 |
   |
note: This is an unsafe fix and may change runtime behavior

SIM222 [*] Use `True` instead of `... or True`
  --> SIM222.py:85:6
   |
83 | a or () or True  # SIM222
84 |
85 | a or tuple(()) or True  # SIM222
   |      ^^^^^^^^^^^^^^^^^
86 |
87 | a or (1,) or True or (2,)  # SIM222
   |
help: Replace with `True`
   |
84 |
   - a or tuple(()) or True  # SIM222
85 + a or True  # SIM222
86 |
   |
note: This is an unsafe fix and may change runtime behavior

SIM222 [*] Use `(1,)` instead of `(1,) or ...`
  --> SIM222.py:87:6
   |
85 | a or tuple(()) or True  # SIM222
86 |
87 | a or (1,) or True or (2,)  # SIM222
   |      ^^^^^^^^^^^^^^^^^^^^
88 |
89 | a or tuple((1,)) or True or tuple((2,))  # SIM222
   |
help: Replace with `(1,)`
   |
86 |
   - a or (1,) or True or (2,)  # SIM222
87 + a or (1,)  # SIM222
88 |
   |
note: This is an unsafe fix and may change runtime behavior

SIM222 [*] Use `tuple((1,))` instead of `tuple((1,)) or ...`
  --> SIM222.py:89:6
   |
87 | a or (1,) or True or (2,)  # SIM222
88 |
89 | a or tuple((1,)) or True or tuple((2,))  # SIM222
   |      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
90 |
91 | a or frozenset() or True  # SIM222
   |
help: Replace with `tuple((1,))`
   |
88 |
   - a or tuple((1,)) or True or tuple((2,))  # SIM222
89 + a or tuple((1,))  # SIM222
90 |
   |
note: This is an unsafe fix and may change runtime behavior

SIM222 [*] Use `True` instead of `... or True`
  --> SIM222.py:91:6
   |
89 | a or tuple((1,)) or True or tuple((2,))  # SIM222
90 |
91 | a or frozenset() or True  # SIM222
   |      ^^^^^^^^^^^^^^^^^^^
92 |
93 | a or frozenset(frozenset()) or True  # SIM222
   |
help: Replace with `True`
   |
90 |
   - a or frozenset() or True  # SIM222
91 + a or True  # SIM222
92 |
   |
note: This is an unsafe fix and may change runtime behavior

SIM222 [*] Use `True` instead of `... or True`
  --> SIM222.py:93:6
   |
91 | a or frozenset() or True  # SIM222
92 |
93 | a or frozenset(frozenset()) or True  # SIM222
   |      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
94 |
95 | a or frozenset({1}) or True or frozenset({2})  # SIM222
   |
help: Replace with `True`
   |
92 |
   - a or frozenset(frozenset()) or True  # SIM222
93 + a or True  # SIM222
94 |
   |
note: This is an unsafe fix and may change runtime behavior

SIM222 [*] Use `frozenset({1})` instead of `frozenset({1}) or ...`
  --> SIM222.py:95:6
   |
93 | a or frozenset(frozenset()) or True  # SIM222
94 |
95 | a or frozenset({1}) or True or frozenset({2})  # SIM222
   |      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
96 |
97 | a or frozenset(frozenset({1})) or True or frozenset(frozenset({2}))  # SIM222
   |
help: Replace with `frozenset({1})`
   |
94 |
   - a or frozenset({1}) or True or frozenset({2})  # SIM222
95 + a or frozenset({1})  # SIM222
96 |
   |
note: This is an unsafe fix and may change runtime behavior

SIM222 [*] Use `frozenset(frozenset({1}))` instead of `frozenset(frozenset({1})) or ...`
  --> SIM222.py:97:6
   |
95 | a or frozenset({1}) or True or frozenset({2})  # SIM222
96 |
97 | a or frozenset(frozenset({1})) or True or frozenset(frozenset({2}))  # SIM222
   |      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
help: Replace with `frozenset(frozenset({1}))`
   |
96 |
   - a or frozenset(frozenset({1})) or True or frozenset(frozenset({2}))  # SIM222
97 + a or frozenset(frozenset({1}))  # SIM222
98 |
   |
note: This is an unsafe fix and may change runtime behavior

SIM222 [*] Use `True` instead of `... or True or ...`
   --> SIM222.py:102:6
    |
100 | # Inside test `a` is simplified.
101 |
102 | bool(a or [1] or True or [2])  # SIM222
    |      ^^^^^^^^^^^^^^^^^^^^^^^
103 |
104 | assert a or [1] or True or [2]  # SIM222
    |
help: Replace with `True`
    |
101 |
    - bool(a or [1] or True or [2])  # SIM222
102 + bool(True)  # SIM222
103 |
    |
note: This is an unsafe fix and may change runtime behavior

SIM222 [*] Use `True` instead of `... or True or ...`
   --> SIM222.py:104:8
    |
102 | bool(a or [1] or True or [2])  # SIM222
103 |
104 | assert a or [1] or True or [2]  # SIM222
    |        ^^^^^^^^^^^^^^^^^^^^^^^
105 |
106 | if (a or [1] or True or [2]) and (a or [1] or True or [2]):  # SIM222
    |
help: Replace with `True`
    |
103 |
    - assert a or [1] or True or [2]  # SIM222
104 + assert True  # SIM222
105 |
    |
note: This is an unsafe fix and may change runtime behavior

SIM222 [*] Use `True` instead of `... or True or ...`
   --> SIM222.py:106:5
    |
104 | assert a or [1] or True or [2]  # SIM222
105 |
106 | if (a or [1] or True or [2]) and (a or [1] or True or [2]):  # SIM222
    |     ^^^^^^^^^^^^^^^^^^^^^^^
107 |     pass
    |
help: Replace with `True`
    |
105 |
    - if (a or [1] or True or [2]) and (a or [1] or True or [2]):  # SIM222
106 + if (True) and (a or [1] or True or [2]):  # SIM222
107 |     pass
    |
note: This is an unsafe fix and may change runtime behavior

SIM222 [*] Use `True` instead of `... or True or ...`
   --> SIM222.py:106:35
    |
104 | assert a or [1] or True or [2]  # SIM222
105 |
106 | if (a or [1] or True or [2]) and (a or [1] or True or [2]):  # SIM222
    |                                   ^^^^^^^^^^^^^^^^^^^^^^^
107 |     pass
    |
help: Replace with `True`
    |
105 |
    - if (a or [1] or True or [2]) and (a or [1] or True or [2]):  # SIM222
106 + if (a or [1] or True or [2]) and (True):  # SIM222
107 |     pass
    |
note: This is an unsafe fix and may change runtime behavior

SIM222 [*] Use `True` instead of `... or True or ...`
   --> SIM222.py:109:6
    |
107 |     pass
108 |
109 | 0 if a or [1] or True or [2] else 1  # SIM222
    |      ^^^^^^^^^^^^^^^^^^^^^^^
110 |
111 | while a or [1] or True or [2]:  # SIM222
    |
help: Replace with `True`
    |
108 |
    - 0 if a or [1] or True or [2] else 1  # SIM222
109 + 0 if True else 1  # SIM222
110 |
    |
note: This is an unsafe fix and may change runtime behavior

SIM222 [*] Use `True` instead of `... or True or ...`
   --> SIM222.py:111:7
    |
109 | 0 if a or [1] or True or [2] else 1  # SIM222
110 |
111 | while a or [1] or True or [2]:  # SIM222
    |       ^^^^^^^^^^^^^^^^^^^^^^^
112 |     pass
    |
help: Replace with `True`
    |
110 |
    - while a or [1] or True or [2]:  # SIM222
111 + while True:  # SIM222
112 |     pass
    |
note: This is an unsafe fix and may change runtime behavior

SIM222 [*] Use `True` instead of `... or True or ...`
   --> SIM222.py:118:8
    |
116 |     for a in range(10)
117 |     for b in range(10)
118 |     if a or [1] or True or [2]  # SIM222
    |        ^^^^^^^^^^^^^^^^^^^^^^^
119 |     if b or [1] or True or [2]  # SIM222
120 | ]
    |
help: Replace with `True`
    |
117 |     for b in range(10)
    -     if a or [1] or True or [2]  # SIM222
118 +     if True  # SIM222
119 |     if b or [1] or True or [2]  # SIM222
    |
note: This is an unsafe fix and may change runtime behavior

SIM222 [*] Use `True` instead of `... or True or ...`
   --> SIM222.py:119:8
    |
117 |     for b in range(10)
118 |     if a or [1] or True or [2]  # SIM222
119 |     if b or [1] or True or [2]  # SIM222
    |        ^^^^^^^^^^^^^^^^^^^^^^^
120 | ]
    |
help: Replace with `True`
    |
118 |     if a or [1] or True or [2]  # SIM222
    -     if b or [1] or True or [2]  # SIM222
119 +     if True  # SIM222
120 | ]
    |
note: This is an unsafe fix and may change runtime behavior

SIM222 [*] Use `True` instead of `... or True or ...`
   --> SIM222.py:126:8
    |
124 |     for a in range(10)
125 |     for b in range(10)
126 |     if a or [1] or True or [2]  # SIM222
    |        ^^^^^^^^^^^^^^^^^^^^^^^
127 |     if b or [1] or True or [2]  # SIM222
128 | }
    |
help: Replace with `True`
    |
125 |     for b in range(10)
    -     if a or [1] or True or [2]  # SIM222
126 +     if True  # SIM222
127 |     if b or [1] or True or [2]  # SIM222
    |
note: This is an unsafe fix and may change runtime behavior

SIM222 [*] Use `True` instead of `... or True or ...`
   --> SIM222.py:127:8
    |
125 |     for b in range(10)
126 |     if a or [1] or True or [2]  # SIM222
127 |     if b or [1] or True or [2]  # SIM222
    |        ^^^^^^^^^^^^^^^^^^^^^^^
128 | }
    |
help: Replace with `True`
    |
126 |     if a or [1] or True or [2]  # SIM222
    -     if b or [1] or True or [2]  # SIM222
127 +     if True  # SIM222
128 | }
    |
note: This is an unsafe fix and may change runtime behavior

SIM222 [*] Use `True` instead of `... or True or ...`
   --> SIM222.py:134:8
    |
132 |     for a in range(10)
133 |     for b in range(10)
134 |     if a or [1] or True or [2]  # SIM222
    |        ^^^^^^^^^^^^^^^^^^^^^^^
135 |     if b or [1] or True or [2]  # SIM222
136 | }
    |
help: Replace with `True`
    |
133 |     for b in range(10)
    -     if a or [1] or True or [2]  # SIM222
134 +     if True  # SIM222
135 |     if b or [1] or True or [2]  # SIM222
    |
note: This is an unsafe fix and may change runtime behavior

SIM222 [*] Use `True` instead of `... or True or ...`
   --> SIM222.py:135:8
    |
133 |     for b in range(10)
134 |     if a or [1] or True or [2]  # SIM222
135 |     if b or [1] or True or [2]  # SIM222
    |        ^^^^^^^^^^^^^^^^^^^^^^^
136 | }
    |
help: Replace with `True`
    |
134 |     if a or [1] or True or [2]  # SIM222
    -     if b or [1] or True or [2]  # SIM222
135 +     if True  # SIM222
136 | }
    |
note: This is an unsafe fix and may change runtime behavior

SIM222 [*] Use `True` instead of `... or True or ...`
   --> SIM222.py:142:8
    |
140 |     for a in range(10)
141 |     for b in range(10)
142 |     if a or [1] or True or [2]  # SIM222
    |        ^^^^^^^^^^^^^^^^^^^^^^^
143 |     if b or [1] or True or [2]  # SIM222
144 | )
    |
help: Replace with `True`
    |
141 |     for b in range(10)
    -     if a or [1] or True or [2]  # SIM222
142 +     if True  # SIM222
143 |     if b or [1] or True or [2]  # SIM222
    |
note: This is an unsafe fix and may change runtime behavior

SIM222 [*] Use `True` instead of `... or True or ...`
   --> SIM222.py:143:8
    |
141 |     for b in range(10)
142 |     if a or [1] or True or [2]  # SIM222
143 |     if b or [1] or True or [2]  # SIM222
    |        ^^^^^^^^^^^^^^^^^^^^^^^
144 | )
    |
help: Replace with `True`
    |
142 |     if a or [1] or True or [2]  # SIM222
    -     if b or [1] or True or [2]  # SIM222
143 +     if True  # SIM222
144 | )
    |
note: This is an unsafe fix and may change runtime behavior

SIM222 [*] Use `[1]` instead of `[1] or ...`
   --> SIM222.py:148:6
    |
146 | # Outside test `a` is not simplified.
147 |
148 | a or [1] or True or [2]  # SIM222
    |      ^^^^^^^^^^^^^^^^^^
149 |
150 | if (a or [1] or True or [2]) == (a or [1]):  # SIM222
    |
help: Replace with `[1]`
    |
147 |
    - a or [1] or True or [2]  # SIM222
148 + a or [1]  # SIM222
149 |
    |
note: This is an unsafe fix and may change runtime behavior

SIM222 [*] Use `[1]` instead of `[1] or ...`
   --> SIM222.py:150:10
    |
148 | a or [1] or True or [2]  # SIM222
149 |
150 | if (a or [1] or True or [2]) == (a or [1]):  # SIM222
    |          ^^^^^^^^^^^^^^^^^^
151 |     pass
    |
help: Replace with `[1]`
    |
149 |
    - if (a or [1] or True or [2]) == (a or [1]):  # SIM222
150 + if (a or [1]) == (a or [1]):  # SIM222
151 |     pass
    |
note: This is an unsafe fix and may change runtime behavior

SIM222 [*] Use `[1]` instead of `[1] or ...`
   --> SIM222.py:153:11
    |
151 |     pass
152 |
153 | if f(a or [1] or True or [2]):  # SIM222
    |           ^^^^^^^^^^^^^^^^^^
154 |     pass
    |
help: Replace with `[1]`
    |
152 |
    - if f(a or [1] or True or [2]):  # SIM222
153 + if f(a or [1]):  # SIM222
154 |     pass
    |
note: This is an unsafe fix and may change runtime behavior

SIM222 [*] Use `(int, int, int)` instead of `(int, int, int) or ...`
   --> SIM222.py:157:30
    |
156 | # Regression test for: https://github.com/astral-sh/ruff/issues/7099
157 | def secondToTime(s0: int) -> (int, int, int) or str:
    |                              ^^^^^^^^^^^^^^^^^^^^^^
158 |     m, s = divmod(s0, 60)
    |
help: Replace with `(int, int, int)`
    |
156 | # Regression test for: https://github.com/astral-sh/ruff/issues/7099
    - def secondToTime(s0: int) -> (int, int, int) or str:
157 + def secondToTime(s0: int) -> (int, int, int):
158 |     m, s = divmod(s0, 60)
    |
note: This is an unsafe fix and may change runtime behavior

SIM222 [*] Use `(int, int, int)` instead of `(int, int, int) or ...`
   --> SIM222.py:161:31
    |
161 | def secondToTime(s0: int) -> ((int, int, int) or str):
    |                               ^^^^^^^^^^^^^^^^^^^^^^
162 |     m, s = divmod(s0, 60)
    |
help: Replace with `(int, int, int)`
    |
160 |
    - def secondToTime(s0: int) -> ((int, int, int) or str):
161 + def secondToTime(s0: int) -> ((int, int, int)):
162 |     m, s = divmod(s0, 60)
    |
note: This is an unsafe fix and may change runtime behavior

SIM222 [*] Use `"bar"` instead of `... or "bar"`
   --> SIM222.py:168:7
    |
166 | print(f"{a}{b}" or "bar")
167 | print(f"{a}{''}" or "bar")
168 | print(f"{''}{''}" or "bar")
    |       ^^^^^^^^^^^^^^^^^^^^
169 | print(f"{1}{''}" or "bar")
    |
help: Replace with `"bar"`
    |
167 | print(f"{a}{''}" or "bar")
    - print(f"{''}{''}" or "bar")
168 + print("bar")
169 | print(f"{1}{''}" or "bar")
    |
note: This is an unsafe fix and may change runtime behavior

SIM222 [*] Use `f"{b''}"` instead of `f"{b''}" or ...`
   --> SIM222.py:202:7
    |
201 | # https://github.com/astral-sh/ruff/issues/20703
202 | print(f"{b''}" or "bar")  # SIM222
    |       ^^^^^^^^^^^^^^^^^
203 | x = 1
204 | print(f"{x=}" or "bar")  # SIM222
    |
help: Replace with `f"{b''}"`
    |
201 | # https://github.com/astral-sh/ruff/issues/20703
    - print(f"{b''}" or "bar")  # SIM222
202 + print(f"{b''}")  # SIM222
203 | x = 1
    |
note: This is an unsafe fix and may change runtime behavior

SIM222 [*] Use `f"{x=}"` instead of `f"{x=}" or ...`
   --> SIM222.py:204:7
    |
202 | print(f"{b''}" or "bar")  # SIM222
203 | x = 1
204 | print(f"{x=}" or "bar")  # SIM222
    |       ^^^^^^^^^^^^^^^^
205 | (lambda: 1) or True  # SIM222
206 | (i for i in range(1)) or "bar"  # SIM222
    |
help: Replace with `f"{x=}"`
    |
203 | x = 1
    - print(f"{x=}" or "bar")  # SIM222
204 + print(f"{x=}")  # SIM222
205 | (lambda: 1) or True  # SIM222
    |
note: This is an unsafe fix and may change runtime behavior

SIM222 [*] Use `lambda: 1` instead of `lambda: 1 or ...`
   --> SIM222.py:205:1
    |
203 | x = 1
204 | print(f"{x=}" or "bar")  # SIM222
205 | (lambda: 1) or True  # SIM222
    | ^^^^^^^^^^^^^^^^^^^
206 | (i for i in range(1)) or "bar"  # SIM222
    |
help: Replace with `lambda: 1`
    |
204 | print(f"{x=}" or "bar")  # SIM222
    - (lambda: 1) or True  # SIM222
205 + lambda: 1  # SIM222
206 | (i for i in range(1)) or "bar"  # SIM222
    |
note: This is an unsafe fix and may change runtime behavior

SIM222 [*] Use `(i for i in range(1))` instead of `(i for i in range(1)) or ...`
   --> SIM222.py:206:1
    |
204 | print(f"{x=}" or "bar")  # SIM222
205 | (lambda: 1) or True  # SIM222
206 | (i for i in range(1)) or "bar"  # SIM222
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
207 |
208 | # https://github.com/astral-sh/ruff/issues/21136
    |
help: Replace with `(i for i in range(1))`
    |
205 | (lambda: 1) or True  # SIM222
    - (i for i in range(1)) or "bar"  # SIM222
206 + (i for i in range(1))  # SIM222
207 |
    |
note: This is an unsafe fix and may change runtime behavior

SIM222 [*] Use `True` instead of `... or True`
   --> SIM222.py:222:1
    |
221 | # https://github.com/astral-sh/ruff/issues/21473
222 | tuple("") or True  # SIM222
    | ^^^^^^^^^^^^^^^^^
223 | tuple(t"") or True  # OK
224 | tuple(0) or True  # OK
    |
help: Replace with `True`
    |
221 | # https://github.com/astral-sh/ruff/issues/21473
    - tuple("") or True  # SIM222
222 + True  # SIM222
223 | tuple(t"") or True  # OK
    |
note: This is an unsafe fix and may change runtime behavior
