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

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

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

SIM223 [*] Use `False` instead of `False and ...`
  --> SIM223.py:19:18
   |
17 |     pass
18 |
19 | if a and f() and False and g() and b:  # SIM223
   |                  ^^^^^^^^^^^^^^^^^^^
20 |     pass
   |
help: Replace with `False`
   |
18 |
   - if a and f() and False and g() and b:  # SIM223
19 + if a and f() and False:  # SIM223
20 |     pass
   |
note: This is an unsafe fix and may change runtime behavior

SIM223 [*] Use `False` instead of `False and ...`
  --> SIM223.py:22:4
   |
20 |     pass
21 |
22 | if False and f() and a and g() and b:  # SIM223
   |    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
23 |     pass
   |
help: Replace with `False`
   |
21 |
   - if False and f() and a and g() and b:  # SIM223
22 + if False:  # SIM223
23 |     pass
   |
note: This is an unsafe fix and may change runtime behavior

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

SIM223 [*] Use `""` instead of `"" and ...`
  --> SIM223.py:42:7
   |
42 | a and "" and False  # SIM223
   |       ^^^^^^^^^^^^
43 |
44 | a and "foo" and False and "bar"  # SIM223
   |
help: Replace with `""`
   |
41 |
   - a and "" and False  # SIM223
42 + a and ""  # SIM223
43 |
   |
note: This is an unsafe fix and may change runtime behavior

SIM223 [*] Use `False` instead of `... and False and ...`
  --> SIM223.py:44:7
   |
42 | a and "" and False  # SIM223
43 |
44 | a and "foo" and False and "bar"  # SIM223
   |       ^^^^^^^^^^^^^^^^^^^^^^^^^
45 |
46 | a and 0 and False  # SIM223
   |
help: Replace with `False`
   |
43 |
   - a and "foo" and False and "bar"  # SIM223
44 + a and False  # SIM223
45 |
   |
note: This is an unsafe fix and may change runtime behavior

SIM223 [*] Use `0` instead of `0 and ...`
  --> SIM223.py:46:7
   |
44 | a and "foo" and False and "bar"  # SIM223
45 |
46 | a and 0 and False  # SIM223
   |       ^^^^^^^^^^^
47 |
48 | a and 1 and False and 2  # SIM223
   |
help: Replace with `0`
   |
45 |
   - a and 0 and False  # SIM223
46 + a and 0  # SIM223
47 |
   |
note: This is an unsafe fix and may change runtime behavior

SIM223 [*] Use `False` instead of `... and False and ...`
  --> SIM223.py:48:7
   |
46 | a and 0 and False  # SIM223
47 |
48 | a and 1 and False and 2  # SIM223
   |       ^^^^^^^^^^^^^^^^^
49 |
50 | a and 0.0 and False  # SIM223
   |
help: Replace with `False`
   |
47 |
   - a and 1 and False and 2  # SIM223
48 + a and False  # SIM223
49 |
   |
note: This is an unsafe fix and may change runtime behavior

SIM223 [*] Use `0.0` instead of `0.0 and ...`
  --> SIM223.py:50:7
   |
48 | a and 1 and False and 2  # SIM223
49 |
50 | a and 0.0 and False  # SIM223
   |       ^^^^^^^^^^^^^
51 |
52 | a and 0.1 and False and 0.2  # SIM223
   |
help: Replace with `0.0`
   |
49 |
   - a and 0.0 and False  # SIM223
50 + a and 0.0  # SIM223
51 |
   |
note: This is an unsafe fix and may change runtime behavior

SIM223 [*] Use `False` instead of `... and False and ...`
  --> SIM223.py:52:7
   |
50 | a and 0.0 and False  # SIM223
51 |
52 | a and 0.1 and False and 0.2  # SIM223
   |       ^^^^^^^^^^^^^^^^^^^^^
53 |
54 | a and [] and False  # SIM223
   |
help: Replace with `False`
   |
51 |
   - a and 0.1 and False and 0.2  # SIM223
52 + a and False  # SIM223
53 |
   |
note: This is an unsafe fix and may change runtime behavior

SIM223 [*] Use `[]` instead of `[] and ...`
  --> SIM223.py:54:7
   |
52 | a and 0.1 and False and 0.2  # SIM223
53 |
54 | a and [] and False  # SIM223
   |       ^^^^^^^^^^^^
55 |
56 | a and list([]) and False  # SIM223
   |
help: Replace with `[]`
   |
53 |
   - a and [] and False  # SIM223
54 + a and []  # SIM223
55 |
   |
note: This is an unsafe fix and may change runtime behavior

SIM223 [*] Use `list([])` instead of `list([]) and ...`
  --> SIM223.py:56:7
   |
54 | a and [] and False  # SIM223
55 |
56 | a and list([]) and False  # SIM223
   |       ^^^^^^^^^^^^^^^^^^
57 |
58 | a and [1] and False and [2]  # SIM223
   |
help: Replace with `list([])`
   |
55 |
   - a and list([]) and False  # SIM223
56 + a and list([])  # SIM223
57 |
   |
note: This is an unsafe fix and may change runtime behavior

SIM223 [*] Use `False` instead of `... and False and ...`
  --> SIM223.py:58:7
   |
56 | a and list([]) and False  # SIM223
57 |
58 | a and [1] and False and [2]  # SIM223
   |       ^^^^^^^^^^^^^^^^^^^^^
59 |
60 | a and list([1]) and False and list([2])  # SIM223
   |
help: Replace with `False`
   |
57 |
   - a and [1] and False and [2]  # SIM223
58 + a and False  # SIM223
59 |
   |
note: This is an unsafe fix and may change runtime behavior

SIM223 [*] Use `False` instead of `... and False and ...`
  --> SIM223.py:60:7
   |
58 | a and [1] and False and [2]  # SIM223
59 |
60 | a and list([1]) and False and list([2])  # SIM223
   |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
61 |
62 | a and {} and False  # SIM223
   |
help: Replace with `False`
   |
59 |
   - a and list([1]) and False and list([2])  # SIM223
60 + a and False  # SIM223
61 |
   |
note: This is an unsafe fix and may change runtime behavior

SIM223 [*] Use `{}` instead of `{} and ...`
  --> SIM223.py:62:7
   |
60 | a and list([1]) and False and list([2])  # SIM223
61 |
62 | a and {} and False  # SIM223
   |       ^^^^^^^^^^^^
63 |
64 | a and dict() and False  # SIM223
   |
help: Replace with `{}`
   |
61 |
   - a and {} and False  # SIM223
62 + a and {}  # SIM223
63 |
   |
note: This is an unsafe fix and may change runtime behavior

SIM223 [*] Use `dict()` instead of `dict() and ...`
  --> SIM223.py:64:7
   |
62 | a and {} and False  # SIM223
63 |
64 | a and dict() and False  # SIM223
   |       ^^^^^^^^^^^^^^^^
65 |
66 | a and {1: 1} and False and {2: 2}  # SIM223
   |
help: Replace with `dict()`
   |
63 |
   - a and dict() and False  # SIM223
64 + a and dict()  # SIM223
65 |
   |
note: This is an unsafe fix and may change runtime behavior

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

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

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

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

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

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

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

SIM223 [*] Use `tuple(())` instead of `tuple(()) and ...`
  --> SIM223.py:80:7
   |
78 | a and () and False  # SIM222
79 |
80 | a and tuple(()) and False  # SIM222
   |       ^^^^^^^^^^^^^^^^^^^
81 |
82 | a and (1,) and False and (2,)  # SIM222
   |
help: Replace with `tuple(())`
   |
79 |
   - a and tuple(()) and False  # SIM222
80 + a and tuple(())  # SIM222
81 |
   |
note: This is an unsafe fix and may change runtime behavior

SIM223 [*] Use `False` instead of `... and False and ...`
  --> SIM223.py:82:7
   |
80 | a and tuple(()) and False  # SIM222
81 |
82 | a and (1,) and False and (2,)  # SIM222
   |       ^^^^^^^^^^^^^^^^^^^^^^^
83 |
84 | a and tuple((1,)) and False and tuple((2,))  # SIM222
   |
help: Replace with `False`
   |
81 |
   - a and (1,) and False and (2,)  # SIM222
82 + a and False  # SIM222
83 |
   |
note: This is an unsafe fix and may change runtime behavior

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

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

SIM223 [*] Use `frozenset(frozenset())` instead of `frozenset(frozenset()) and ...`
  --> SIM223.py:88:7
   |
86 | a and frozenset() and False  # SIM222
87 |
88 | a and frozenset(frozenset()) and False  # SIM222
   |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
89 |
90 | a and frozenset({1}) and False and frozenset({2})  # SIM222
   |
help: Replace with `frozenset(frozenset())`
   |
87 |
   - a and frozenset(frozenset()) and False  # SIM222
88 + a and frozenset(frozenset())  # SIM222
89 |
   |
note: This is an unsafe fix and may change runtime behavior

SIM223 [*] Use `False` instead of `... and False and ...`
  --> SIM223.py:90:7
   |
88 | a and frozenset(frozenset()) and False  # SIM222
89 |
90 | a and frozenset({1}) and False and frozenset({2})  # SIM222
   |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
91 |
92 | a and frozenset(frozenset({1})) and False and frozenset(frozenset({2}))  # SIM222
   |
help: Replace with `False`
   |
89 |
   - a and frozenset({1}) and False and frozenset({2})  # SIM222
90 + a and False  # SIM222
91 |
   |
note: This is an unsafe fix and may change runtime behavior

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

SIM223 [*] Use `False` instead of `... and False and ...`
  --> SIM223.py:97:6
   |
95 | # Inside test `a` is simplified.
96 |
97 | bool(a and [] and False and [])  # SIM223
   |      ^^^^^^^^^^^^^^^^^^^^^^^^^
98 |
99 | assert a and [] and False and []  # SIM223
   |
help: Replace with `False`
   |
96 |
   - bool(a and [] and False and [])  # SIM223
97 + bool(False)  # SIM223
98 |
   |
note: This is an unsafe fix and may change runtime behavior

SIM223 [*] Use `False` instead of `... and False and ...`
   --> SIM223.py:99:8
    |
 97 | bool(a and [] and False and [])  # SIM223
 98 |
 99 | assert a and [] and False and []  # SIM223
    |        ^^^^^^^^^^^^^^^^^^^^^^^^^
100 |
101 | if (a and [] and False and []) or (a and [] and False and []):  # SIM223
    |
help: Replace with `False`
    |
98  |
    - assert a and [] and False and []  # SIM223
99  + assert False  # SIM223
100 |
    |
note: This is an unsafe fix and may change runtime behavior

SIM223 [*] Use `False` instead of `... and False and ...`
   --> SIM223.py:101:5
    |
 99 | assert a and [] and False and []  # SIM223
100 |
101 | if (a and [] and False and []) or (a and [] and False and []):  # SIM223
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^
102 |     pass
    |
help: Replace with `False`
    |
100 |
    - if (a and [] and False and []) or (a and [] and False and []):  # SIM223
101 + if (False) or (a and [] and False and []):  # SIM223
102 |     pass
    |
note: This is an unsafe fix and may change runtime behavior

SIM223 [*] Use `False` instead of `... and False and ...`
   --> SIM223.py:101:36
    |
 99 | assert a and [] and False and []  # SIM223
100 |
101 | if (a and [] and False and []) or (a and [] and False and []):  # SIM223
    |                                    ^^^^^^^^^^^^^^^^^^^^^^^^^
102 |     pass
    |
help: Replace with `False`
    |
100 |
    - if (a and [] and False and []) or (a and [] and False and []):  # SIM223
101 + if (a and [] and False and []) or (False):  # SIM223
102 |     pass
    |
note: This is an unsafe fix and may change runtime behavior

SIM223 [*] Use `False` instead of `... and False and ...`
   --> SIM223.py:104:6
    |
102 |     pass
103 |
104 | 0 if a and [] and False and [] else 1  # SIM222
    |      ^^^^^^^^^^^^^^^^^^^^^^^^^
105 |
106 | while a and [] and False and []:  # SIM223
    |
help: Replace with `False`
    |
103 |
    - 0 if a and [] and False and [] else 1  # SIM222
104 + 0 if False else 1  # SIM222
105 |
    |
note: This is an unsafe fix and may change runtime behavior

SIM223 [*] Use `False` instead of `... and False and ...`
   --> SIM223.py:106:7
    |
104 | 0 if a and [] and False and [] else 1  # SIM222
105 |
106 | while a and [] and False and []:  # SIM223
    |       ^^^^^^^^^^^^^^^^^^^^^^^^^
107 |     pass
    |
help: Replace with `False`
    |
105 |
    - while a and [] and False and []:  # SIM223
106 + while False:  # SIM223
107 |     pass
    |
note: This is an unsafe fix and may change runtime behavior

SIM223 [*] Use `False` instead of `... and False and ...`
   --> SIM223.py:113:8
    |
111 |     for a in range(10)
112 |     for b in range(10)
113 |     if a and [] and False and []  # SIM223
    |        ^^^^^^^^^^^^^^^^^^^^^^^^^
114 |     if b and [] and False and []  # SIM223
115 | ]
    |
help: Replace with `False`
    |
112 |     for b in range(10)
    -     if a and [] and False and []  # SIM223
113 +     if False  # SIM223
114 |     if b and [] and False and []  # SIM223
    |
note: This is an unsafe fix and may change runtime behavior

SIM223 [*] Use `False` instead of `... and False and ...`
   --> SIM223.py:114:8
    |
112 |     for b in range(10)
113 |     if a and [] and False and []  # SIM223
114 |     if b and [] and False and []  # SIM223
    |        ^^^^^^^^^^^^^^^^^^^^^^^^^
115 | ]
    |
help: Replace with `False`
    |
113 |     if a and [] and False and []  # SIM223
    -     if b and [] and False and []  # SIM223
114 +     if False  # SIM223
115 | ]
    |
note: This is an unsafe fix and may change runtime behavior

SIM223 [*] Use `False` instead of `... and False and ...`
   --> SIM223.py:121:8
    |
119 |     for a in range(10)
120 |     for b in range(10)
121 |     if a and [] and False and []  # SIM223
    |        ^^^^^^^^^^^^^^^^^^^^^^^^^
122 |     if b and [] and False and []  # SIM223
123 | }
    |
help: Replace with `False`
    |
120 |     for b in range(10)
    -     if a and [] and False and []  # SIM223
121 +     if False  # SIM223
122 |     if b and [] and False and []  # SIM223
    |
note: This is an unsafe fix and may change runtime behavior

SIM223 [*] Use `False` instead of `... and False and ...`
   --> SIM223.py:122:8
    |
120 |     for b in range(10)
121 |     if a and [] and False and []  # SIM223
122 |     if b and [] and False and []  # SIM223
    |        ^^^^^^^^^^^^^^^^^^^^^^^^^
123 | }
    |
help: Replace with `False`
    |
121 |     if a and [] and False and []  # SIM223
    -     if b and [] and False and []  # SIM223
122 +     if False  # SIM223
123 | }
    |
note: This is an unsafe fix and may change runtime behavior

SIM223 [*] Use `False` instead of `... and False and ...`
   --> SIM223.py:129:8
    |
127 |     for a in range(10)
128 |     for b in range(10)
129 |     if a and [] and False and []  # SIM223
    |        ^^^^^^^^^^^^^^^^^^^^^^^^^
130 |     if b and [] and False and []  # SIM223
131 | }
    |
help: Replace with `False`
    |
128 |     for b in range(10)
    -     if a and [] and False and []  # SIM223
129 +     if False  # SIM223
130 |     if b and [] and False and []  # SIM223
    |
note: This is an unsafe fix and may change runtime behavior

SIM223 [*] Use `False` instead of `... and False and ...`
   --> SIM223.py:130:8
    |
128 |     for b in range(10)
129 |     if a and [] and False and []  # SIM223
130 |     if b and [] and False and []  # SIM223
    |        ^^^^^^^^^^^^^^^^^^^^^^^^^
131 | }
    |
help: Replace with `False`
    |
129 |     if a and [] and False and []  # SIM223
    -     if b and [] and False and []  # SIM223
130 +     if False  # SIM223
131 | }
    |
note: This is an unsafe fix and may change runtime behavior

SIM223 [*] Use `False` instead of `... and False and ...`
   --> SIM223.py:137:8
    |
135 |     for a in range(10)
136 |     for b in range(10)
137 |     if a and [] and False and []  # SIM223
    |        ^^^^^^^^^^^^^^^^^^^^^^^^^
138 |     if b and [] and False and []  # SIM223
139 | )
    |
help: Replace with `False`
    |
136 |     for b in range(10)
    -     if a and [] and False and []  # SIM223
137 +     if False  # SIM223
138 |     if b and [] and False and []  # SIM223
    |
note: This is an unsafe fix and may change runtime behavior

SIM223 [*] Use `False` instead of `... and False and ...`
   --> SIM223.py:138:8
    |
136 |     for b in range(10)
137 |     if a and [] and False and []  # SIM223
138 |     if b and [] and False and []  # SIM223
    |        ^^^^^^^^^^^^^^^^^^^^^^^^^
139 | )
    |
help: Replace with `False`
    |
137 |     if a and [] and False and []  # SIM223
    -     if b and [] and False and []  # SIM223
138 +     if False  # SIM223
139 | )
    |
note: This is an unsafe fix and may change runtime behavior

SIM223 [*] Use `[]` instead of `[] and ...`
   --> SIM223.py:143:7
    |
141 | # Outside test `a` is not simplified.
142 |
143 | a and [] and False and []  # SIM223
    |       ^^^^^^^^^^^^^^^^^^^
144 |
145 | if (a and [] and False and []) == (a and []):  # SIM223
    |
help: Replace with `[]`
    |
142 |
    - a and [] and False and []  # SIM223
143 + a and []  # SIM223
144 |
    |
note: This is an unsafe fix and may change runtime behavior

SIM223 [*] Use `[]` instead of `[] and ...`
   --> SIM223.py:145:11
    |
143 | a and [] and False and []  # SIM223
144 |
145 | if (a and [] and False and []) == (a and []):  # SIM223
    |           ^^^^^^^^^^^^^^^^^^^
146 |     pass
    |
help: Replace with `[]`
    |
144 |
    - if (a and [] and False and []) == (a and []):  # SIM223
145 + if (a and []) == (a and []):  # SIM223
146 |     pass
    |
note: This is an unsafe fix and may change runtime behavior

SIM223 [*] Use `[]` instead of `[] and ...`
   --> SIM223.py:148:12
    |
146 |     pass
147 |
148 | if f(a and [] and False and []):  # SIM223
    |            ^^^^^^^^^^^^^^^^^^^
149 |     pass
    |
help: Replace with `[]`
    |
147 |
    - if f(a and [] and False and []):  # SIM223
148 + if f(a and []):  # SIM223
149 |     pass
    |
note: This is an unsafe fix and may change runtime behavior

SIM223 [*] Use `f"{''}{''}"` instead of `f"{''}{''}" and ...`
   --> SIM223.py:154:7
    |
152 | print(f"{a}{b}" and "bar")
153 | print(f"{a}{''}" and "bar")
154 | print(f"{''}{''}" and "bar")
    |       ^^^^^^^^^^^^^^^^^^^^^
155 | print(f"{1}{''}" and "bar")
    |
help: Replace with `f"{''}{''}"`
    |
153 | print(f"{a}{''}" and "bar")
    - print(f"{''}{''}" and "bar")
154 + print(f"{''}{''}")
155 | print(f"{1}{''}" and "bar")
    |
note: This is an unsafe fix and may change runtime behavior

SIM223 [*] Use `tuple("")` instead of `tuple("") and ...`
   --> SIM223.py:163:1
    |
162 | # https://github.com/astral-sh/ruff/issues/21473
163 | tuple("") and False  # SIM223
    | ^^^^^^^^^^^^^^^^^^^
164 | tuple(t"") and False  # OK
165 | tuple(0) and False  # OK
    |
help: Replace with `tuple("")`
    |
162 | # https://github.com/astral-sh/ruff/issues/21473
    - tuple("") and False  # SIM223
163 + tuple("")  # SIM223
164 | tuple(t"") and False  # OK
    |
note: This is an unsafe fix and may change runtime behavior
