---
source: crates/ruff/src/rules/flake8_simplify/mod.rs
---
SIM223.py:1:4: SIM223 [*] Use `False` instead of `... and False`
  |
1 | if a and False:  # SIM223
  |    ^^^^^^^^^^^ SIM223
2 |     pass
  |
  = help: Replace with `False`

ℹ Suggested fix
1   |-if a and False:  # SIM223
  1 |+if False:  # SIM223
2 2 |     pass
3 3 | 
4 4 | if (a or b) and False:  # SIM223

SIM223.py:4:4: SIM223 [*] Use `False` instead of `... and False`
  |
4 |     pass
5 | 
6 | if (a or b) and False:  # SIM223
  |    ^^^^^^^^^^^^^^^^^^ SIM223
7 |     pass
  |
  = help: Replace with `False`

ℹ Suggested fix
1 1 | if a and False:  # SIM223
2 2 |     pass
3 3 | 
4   |-if (a or b) and False:  # SIM223
  4 |+if False:  # SIM223
5 5 |     pass
6 6 | 
7 7 | if a or (b and False):  # SIM223

SIM223.py:7:10: SIM223 [*] Use `False` instead of `... and False`
   |
 7 |     pass
 8 | 
 9 | if a or (b and False):  # SIM223
   |          ^^^^^^^^^^^ SIM223
10 |     pass
   |
   = help: Replace with `False`

ℹ Suggested fix
4 4 | if (a or b) and False:  # SIM223
5 5 |     pass
6 6 | 
7   |-if a or (b and False):  # SIM223
  7 |+if a or (False):  # SIM223
8 8 |     pass
9 9 | 
10 10 | if a or False:

SIM223.py:19:18: SIM223 [*] Use `False` instead of `False and ...`
   |
19 |     pass
20 | 
21 | if a and f() and False and g() and b:  # SIM223
   |                  ^^^^^^^^^^^^^^^^^^^ SIM223
22 |     pass
   |
   = help: Replace with `False`

ℹ Suggested fix
16 16 | if a and f() and b and g() and False:  # OK
17 17 |     pass
18 18 | 
19    |-if a and f() and False and g() and b:  # SIM223
   19 |+if a and f() and False:  # SIM223
20 20 |     pass
21 21 | 
22 22 | if False and f() and a and g() and b:  # SIM223

SIM223.py:22:4: SIM223 [*] Use `False` instead of `False and ...`
   |
22 |     pass
23 | 
24 | if False and f() and a and g() and b:  # SIM223
   |    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ SIM223
25 |     pass
   |
   = help: Replace with `False`

ℹ Suggested fix
19 19 | if a and f() and False and g() and b:  # SIM223
20 20 |     pass
21 21 | 
22    |-if False and f() and a and g() and b:  # SIM223
   22 |+if False:  # SIM223
23 23 |     pass
24 24 | 
25 25 | if a and False and f() and b and g():  # SIM223

SIM223.py:25:4: SIM223 [*] Use `False` instead of `... and False and ...`
   |
25 |     pass
26 | 
27 | if a and False and f() and b and g():  # SIM223
   |    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ SIM223
28 |     pass
   |
   = help: Replace with `False`

ℹ Suggested fix
22 22 | if False and f() and a and g() and b:  # SIM223
23 23 |     pass
24 24 | 
25    |-if a and False and f() and b and g():  # SIM223
   25 |+if False:  # SIM223
26 26 |     pass
27 27 | 
28 28 | 

SIM223.py:42:7: SIM223 [*] Use `""` instead of `"" and ...`
   |
42 | a and "" and False  # SIM223
   |       ^^^^^^^^^^^^ SIM223
43 | 
44 | a and "foo" and False and "bar"  # SIM223
   |
   = help: Replace with `""`

ℹ Suggested fix
39 39 |     pass
40 40 | 
41 41 | 
42    |-a and "" and False  # SIM223
   42 |+a and ""  # SIM223
43 43 | 
44 44 | a and "foo" and False and "bar"  # SIM223
45 45 | 

SIM223.py:44:7: SIM223 [*] Use `False` instead of `... and False and ...`
   |
44 | a and "" and False  # SIM223
45 | 
46 | a and "foo" and False and "bar"  # SIM223
   |       ^^^^^^^^^^^^^^^^^^^^^^^^^ SIM223
47 | 
48 | a and 0 and False  # SIM223
   |
   = help: Replace with `False`

ℹ Suggested fix
41 41 | 
42 42 | a and "" and False  # SIM223
43 43 | 
44    |-a and "foo" and False and "bar"  # SIM223
   44 |+a and False  # SIM223
45 45 | 
46 46 | a and 0 and False  # SIM223
47 47 | 

SIM223.py:46:7: SIM223 [*] Use `0` instead of `0 and ...`
   |
46 | a and "foo" and False and "bar"  # SIM223
47 | 
48 | a and 0 and False  # SIM223
   |       ^^^^^^^^^^^ SIM223
49 | 
50 | a and 1 and False and 2  # SIM223
   |
   = help: Replace with `0`

ℹ Suggested fix
43 43 | 
44 44 | a and "foo" and False and "bar"  # SIM223
45 45 | 
46    |-a and 0 and False  # SIM223
   46 |+a and 0  # SIM223
47 47 | 
48 48 | a and 1 and False and 2  # SIM223
49 49 | 

SIM223.py:48:7: SIM223 [*] Use `False` instead of `... and False and ...`
   |
48 | a and 0 and False  # SIM223
49 | 
50 | a and 1 and False and 2  # SIM223
   |       ^^^^^^^^^^^^^^^^^ SIM223
51 | 
52 | a and 0.0 and False  # SIM223
   |
   = help: Replace with `False`

ℹ Suggested fix
45 45 | 
46 46 | a and 0 and False  # SIM223
47 47 | 
48    |-a and 1 and False and 2  # SIM223
   48 |+a and False  # SIM223
49 49 | 
50 50 | a and 0.0 and False  # SIM223
51 51 | 

SIM223.py:50:7: SIM223 [*] Use `0.0` instead of `0.0 and ...`
   |
50 | a and 1 and False and 2  # SIM223
51 | 
52 | a and 0.0 and False  # SIM223
   |       ^^^^^^^^^^^^^ SIM223
53 | 
54 | a and 0.1 and False and 0.2  # SIM223
   |
   = help: Replace with `0.0`

ℹ Suggested fix
47 47 | 
48 48 | a and 1 and False and 2  # SIM223
49 49 | 
50    |-a and 0.0 and False  # SIM223
   50 |+a and 0.0  # SIM223
51 51 | 
52 52 | a and 0.1 and False and 0.2  # SIM223
53 53 | 

SIM223.py:52:7: SIM223 [*] Use `False` instead of `... and False and ...`
   |
52 | a and 0.0 and False  # SIM223
53 | 
54 | a and 0.1 and False and 0.2  # SIM223
   |       ^^^^^^^^^^^^^^^^^^^^^ SIM223
55 | 
56 | a and [] and False  # SIM223
   |
   = help: Replace with `False`

ℹ Suggested fix
49 49 | 
50 50 | a and 0.0 and False  # SIM223
51 51 | 
52    |-a and 0.1 and False and 0.2  # SIM223
   52 |+a and False  # SIM223
53 53 | 
54 54 | a and [] and False  # SIM223
55 55 | 

SIM223.py:54:7: SIM223 [*] Use `[]` instead of `[] and ...`
   |
54 | a and 0.1 and False and 0.2  # SIM223
55 | 
56 | a and [] and False  # SIM223
   |       ^^^^^^^^^^^^ SIM223
57 | 
58 | a and list([]) and False  # SIM223
   |
   = help: Replace with `[]`

ℹ Suggested fix
51 51 | 
52 52 | a and 0.1 and False and 0.2  # SIM223
53 53 | 
54    |-a and [] and False  # SIM223
   54 |+a and []  # SIM223
55 55 | 
56 56 | a and list([]) and False  # SIM223
57 57 | 

SIM223.py:56:7: SIM223 [*] Use `list([])` instead of `list([]) and ...`
   |
56 | a and [] and False  # SIM223
57 | 
58 | a and list([]) and False  # SIM223
   |       ^^^^^^^^^^^^^^^^^^ SIM223
59 | 
60 | a and [1] and False and [2]  # SIM223
   |
   = help: Replace with `list([])`

ℹ Suggested fix
53 53 | 
54 54 | a and [] and False  # SIM223
55 55 | 
56    |-a and list([]) and False  # SIM223
   56 |+a and list([])  # SIM223
57 57 | 
58 58 | a and [1] and False and [2]  # SIM223
59 59 | 

SIM223.py:58:7: SIM223 [*] Use `False` instead of `... and False and ...`
   |
58 | a and list([]) and False  # SIM223
59 | 
60 | a and [1] and False and [2]  # SIM223
   |       ^^^^^^^^^^^^^^^^^^^^^ SIM223
61 | 
62 | a and list([1]) and False and list([2])  # SIM223
   |
   = help: Replace with `False`

ℹ Suggested fix
55 55 | 
56 56 | a and list([]) and False  # SIM223
57 57 | 
58    |-a and [1] and False and [2]  # SIM223
   58 |+a and False  # SIM223
59 59 | 
60 60 | a and list([1]) and False and list([2])  # SIM223
61 61 | 

SIM223.py:60:7: SIM223 [*] Use `False` instead of `... and False and ...`
   |
60 | a and [1] and False and [2]  # SIM223
61 | 
62 | a and list([1]) and False and list([2])  # SIM223
   |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ SIM223
63 | 
64 | a and {} and False  # SIM223
   |
   = help: Replace with `False`

ℹ Suggested fix
57 57 | 
58 58 | a and [1] and False and [2]  # SIM223
59 59 | 
60    |-a and list([1]) and False and list([2])  # SIM223
   60 |+a and False  # SIM223
61 61 | 
62 62 | a and {} and False  # SIM223
63 63 | 

SIM223.py:62:7: SIM223 [*] Use `{}` instead of `{} and ...`
   |
62 | a and list([1]) and False and list([2])  # SIM223
63 | 
64 | a and {} and False  # SIM223
   |       ^^^^^^^^^^^^ SIM223
65 | 
66 | a and dict() and False  # SIM223
   |
   = help: Replace with `{}`

ℹ Suggested fix
59 59 | 
60 60 | a and list([1]) and False and list([2])  # SIM223
61 61 | 
62    |-a and {} and False  # SIM223
   62 |+a and {}  # SIM223
63 63 | 
64 64 | a and dict() and False  # SIM223
65 65 | 

SIM223.py:64:7: SIM223 [*] Use `dict()` instead of `dict() and ...`
   |
64 | a and {} and False  # SIM223
65 | 
66 | a and dict() and False  # SIM223
   |       ^^^^^^^^^^^^^^^^ SIM223
67 | 
68 | a and {1: 1} and False and {2: 2}  # SIM223
   |
   = help: Replace with `dict()`

ℹ Suggested fix
61 61 | 
62 62 | a and {} and False  # SIM223
63 63 | 
64    |-a and dict() and False  # SIM223
   64 |+a and dict()  # SIM223
65 65 | 
66 66 | a and {1: 1} and False and {2: 2}  # SIM223
67 67 | 

SIM223.py:66:7: SIM223 [*] Use `False` instead of `... and False and ...`
   |
66 | a and dict() and False  # SIM223
67 | 
68 | a and {1: 1} and False and {2: 2}  # SIM223
   |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^ SIM223
69 | 
70 | a and dict({1: 1}) and False and dict({2: 2})  # SIM223
   |
   = help: Replace with `False`

ℹ Suggested fix
63 63 | 
64 64 | a and dict() and False  # SIM223
65 65 | 
66    |-a and {1: 1} and False and {2: 2}  # SIM223
   66 |+a and False  # SIM223
67 67 | 
68 68 | a and dict({1: 1}) and False and dict({2: 2})  # SIM223
69 69 | 

SIM223.py:68:7: SIM223 [*] Use `False` instead of `... and False and ...`
   |
68 | a and {1: 1} and False and {2: 2}  # SIM223
69 | 
70 | a and dict({1: 1}) and False and dict({2: 2})  # SIM223
   |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ SIM223
71 | 
72 | a and set() and False  # SIM223
   |
   = help: Replace with `False`

ℹ Suggested fix
65 65 | 
66 66 | a and {1: 1} and False and {2: 2}  # SIM223
67 67 | 
68    |-a and dict({1: 1}) and False and dict({2: 2})  # SIM223
   68 |+a and False  # SIM223
69 69 | 
70 70 | a and set() and False  # SIM223
71 71 | 

SIM223.py:70:7: SIM223 [*] Use `set()` instead of `set() and ...`
   |
70 | a and dict({1: 1}) and False and dict({2: 2})  # SIM223
71 | 
72 | a and set() and False  # SIM223
   |       ^^^^^^^^^^^^^^^ SIM223
73 | 
74 | a and set(set()) and False  # SIM223
   |
   = help: Replace with `set()`

ℹ Suggested fix
67 67 | 
68 68 | a and dict({1: 1}) and False and dict({2: 2})  # SIM223
69 69 | 
70    |-a and set() and False  # SIM223
   70 |+a and set()  # SIM223
71 71 | 
72 72 | a and set(set()) and False  # SIM223
73 73 | 

SIM223.py:72:7: SIM223 [*] Use `set(set())` instead of `set(set()) and ...`
   |
72 | a and set() and False  # SIM223
73 | 
74 | a and set(set()) and False  # SIM223
   |       ^^^^^^^^^^^^^^^^^^^^ SIM223
75 | 
76 | a and {1} and False and {2}  # SIM223
   |
   = help: Replace with `set(set())`

ℹ Suggested fix
69 69 | 
70 70 | a and set() and False  # SIM223
71 71 | 
72    |-a and set(set()) and False  # SIM223
   72 |+a and set(set())  # SIM223
73 73 | 
74 74 | a and {1} and False and {2}  # SIM223
75 75 | 

SIM223.py:74:7: SIM223 [*] Use `False` instead of `... and False and ...`
   |
74 | a and set(set()) and False  # SIM223
75 | 
76 | a and {1} and False and {2}  # SIM223
   |       ^^^^^^^^^^^^^^^^^^^^^ SIM223
77 | 
78 | a and set({1}) and False and set({2})  # SIM223
   |
   = help: Replace with `False`

ℹ Suggested fix
71 71 | 
72 72 | a and set(set()) and False  # SIM223
73 73 | 
74    |-a and {1} and False and {2}  # SIM223
   74 |+a and False  # SIM223
75 75 | 
76 76 | a and set({1}) and False and set({2})  # SIM223
77 77 | 

SIM223.py:76:7: SIM223 [*] Use `False` instead of `... and False and ...`
   |
76 | a and {1} and False and {2}  # SIM223
77 | 
78 | a and set({1}) and False and set({2})  # SIM223
   |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ SIM223
79 | 
80 | a and () and False  # SIM222
   |
   = help: Replace with `False`

ℹ Suggested fix
73 73 | 
74 74 | a and {1} and False and {2}  # SIM223
75 75 | 
76    |-a and set({1}) and False and set({2})  # SIM223
   76 |+a and False  # SIM223
77 77 | 
78 78 | a and () and False  # SIM222
79 79 | 

SIM223.py:78:7: SIM223 [*] Use `()` instead of `() and ...`
   |
78 | a and set({1}) and False and set({2})  # SIM223
79 | 
80 | a and () and False  # SIM222
   |       ^^^^^^^^^^^^ SIM223
81 | 
82 | a and tuple(()) and False  # SIM222
   |
   = help: Replace with `()`

ℹ Suggested fix
75 75 | 
76 76 | a and set({1}) and False and set({2})  # SIM223
77 77 | 
78    |-a and () and False  # SIM222
   78 |+a and ()  # SIM222
79 79 | 
80 80 | a and tuple(()) and False  # SIM222
81 81 | 

SIM223.py:80:7: SIM223 [*] Use `tuple(())` instead of `tuple(()) and ...`
   |
80 | a and () and False  # SIM222
81 | 
82 | a and tuple(()) and False  # SIM222
   |       ^^^^^^^^^^^^^^^^^^^ SIM223
83 | 
84 | a and (1,) and False and (2,)  # SIM222
   |
   = help: Replace with `tuple(())`

ℹ Suggested fix
77 77 | 
78 78 | a and () and False  # SIM222
79 79 | 
80    |-a and tuple(()) and False  # SIM222
   80 |+a and tuple(())  # SIM222
81 81 | 
82 82 | a and (1,) and False and (2,)  # SIM222
83 83 | 

SIM223.py:82:7: SIM223 [*] Use `False` instead of `... and False and ...`
   |
82 | a and tuple(()) and False  # SIM222
83 | 
84 | a and (1,) and False and (2,)  # SIM222
   |       ^^^^^^^^^^^^^^^^^^^^^^^ SIM223
85 | 
86 | a and tuple((1,)) and False and tuple((2,))  # SIM222
   |
   = help: Replace with `False`

ℹ Suggested fix
79 79 | 
80 80 | a and tuple(()) and False  # SIM222
81 81 | 
82    |-a and (1,) and False and (2,)  # SIM222
   82 |+a and False  # SIM222
83 83 | 
84 84 | a and tuple((1,)) and False and tuple((2,))  # SIM222
85 85 | 

SIM223.py:84:7: SIM223 [*] Use `False` instead of `... and False and ...`
   |
84 | a and (1,) and False and (2,)  # SIM222
85 | 
86 | a and tuple((1,)) and False and tuple((2,))  # SIM222
   |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ SIM223
87 | 
88 | a and frozenset() and False  # SIM222
   |
   = help: Replace with `False`

ℹ Suggested fix
81 81 | 
82 82 | a and (1,) and False and (2,)  # SIM222
83 83 | 
84    |-a and tuple((1,)) and False and tuple((2,))  # SIM222
   84 |+a and False  # SIM222
85 85 | 
86 86 | a and frozenset() and False  # SIM222
87 87 | 

SIM223.py:86:7: SIM223 [*] Use `frozenset()` instead of `frozenset() and ...`
   |
86 | a and tuple((1,)) and False and tuple((2,))  # SIM222
87 | 
88 | a and frozenset() and False  # SIM222
   |       ^^^^^^^^^^^^^^^^^^^^^ SIM223
89 | 
90 | a and frozenset(frozenset()) and False  # SIM222
   |
   = help: Replace with `frozenset()`

ℹ Suggested fix
83 83 | 
84 84 | a and tuple((1,)) and False and tuple((2,))  # SIM222
85 85 | 
86    |-a and frozenset() and False  # SIM222
   86 |+a and frozenset()  # SIM222
87 87 | 
88 88 | a and frozenset(frozenset()) and False  # SIM222
89 89 | 

SIM223.py:88:7: SIM223 [*] Use `frozenset(frozenset())` instead of `frozenset(frozenset()) and ...`
   |
88 | a and frozenset() and False  # SIM222
89 | 
90 | a and frozenset(frozenset()) and False  # SIM222
   |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ SIM223
91 | 
92 | a and frozenset({1}) and False and frozenset({2})  # SIM222
   |
   = help: Replace with `frozenset(frozenset())`

ℹ Suggested fix
85 85 | 
86 86 | a and frozenset() and False  # SIM222
87 87 | 
88    |-a and frozenset(frozenset()) and False  # SIM222
   88 |+a and frozenset(frozenset())  # SIM222
89 89 | 
90 90 | a and frozenset({1}) and False and frozenset({2})  # SIM222
91 91 | 

SIM223.py:90:7: SIM223 [*] Use `False` instead of `... and False and ...`
   |
90 | a and frozenset(frozenset()) and False  # SIM222
91 | 
92 | a and frozenset({1}) and False and frozenset({2})  # SIM222
   |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ SIM223
93 | 
94 | a and frozenset(frozenset({1})) and False and frozenset(frozenset({2}))  # SIM222
   |
   = help: Replace with `False`

ℹ Suggested fix
87 87 | 
88 88 | a and frozenset(frozenset()) and False  # SIM222
89 89 | 
90    |-a and frozenset({1}) and False and frozenset({2})  # SIM222
   90 |+a and False  # SIM222
91 91 | 
92 92 | a and frozenset(frozenset({1})) and False and frozenset(frozenset({2}))  # SIM222
93 93 | 

SIM223.py:92:7: SIM223 [*] Use `False` instead of `... and False and ...`
   |
92 | a and frozenset({1}) and False and frozenset({2})  # SIM222
93 | 
94 | a and frozenset(frozenset({1})) and False and frozenset(frozenset({2}))  # SIM222
   |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ SIM223
   |
   = help: Replace with `False`

ℹ Suggested fix
89 89 | 
90 90 | a and frozenset({1}) and False and frozenset({2})  # SIM222
91 91 | 
92    |-a and frozenset(frozenset({1})) and False and frozenset(frozenset({2}))  # SIM222
   92 |+a and False  # SIM222
93 93 | 
94 94 | 
95 95 | # Inside test `a` is simplified.

SIM223.py:97:6: SIM223 [*] Use `False` instead of `... and False and ...`
    |
 97 | # Inside test `a` is simplified.
 98 | 
 99 | bool(a and [] and False and [])  # SIM223
    |      ^^^^^^^^^^^^^^^^^^^^^^^^^ SIM223
100 | 
101 | assert a and [] and False and []  # SIM223
    |
    = help: Replace with `False`

ℹ Suggested fix
94 94 | 
95 95 | # Inside test `a` is simplified.
96 96 | 
97    |-bool(a and [] and False and [])  # SIM223
   97 |+bool(False)  # SIM223
98 98 | 
99 99 | assert a and [] and False and []  # SIM223
100 100 | 

SIM223.py:99:8: SIM223 [*] Use `False` instead of `... and False and ...`
    |
 99 | bool(a and [] and False and [])  # SIM223
100 | 
101 | assert a and [] and False and []  # SIM223
    |        ^^^^^^^^^^^^^^^^^^^^^^^^^ SIM223
102 | 
103 | if (a and [] and False and []) or (a and [] and False and []):  # SIM223
    |
    = help: Replace with `False`

ℹ Suggested fix
96  96  | 
97  97  | bool(a and [] and False and [])  # SIM223
98  98  | 
99      |-assert a and [] and False and []  # SIM223
    99  |+assert False  # SIM223
100 100 | 
101 101 | if (a and [] and False and []) or (a and [] and False and []):  # SIM223
102 102 |     pass

SIM223.py:101:5: SIM223 [*] Use `False` instead of `... and False and ...`
    |
101 | assert a and [] and False and []  # SIM223
102 | 
103 | if (a and [] and False and []) or (a and [] and False and []):  # SIM223
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^ SIM223
104 |     pass
    |
    = help: Replace with `False`

ℹ Suggested fix
98  98  | 
99  99  | assert a and [] and False and []  # SIM223
100 100 | 
101     |-if (a and [] and False and []) or (a and [] and False and []):  # SIM223
    101 |+if (False) or (a and [] and False and []):  # SIM223
102 102 |     pass
103 103 | 
104 104 | 0 if a and [] and False and [] else 1  # SIM222

SIM223.py:101:36: SIM223 [*] Use `False` instead of `... and False and ...`
    |
101 | assert a and [] and False and []  # SIM223
102 | 
103 | if (a and [] and False and []) or (a and [] and False and []):  # SIM223
    |                                    ^^^^^^^^^^^^^^^^^^^^^^^^^ SIM223
104 |     pass
    |
    = help: Replace with `False`

ℹ Suggested fix
98  98  | 
99  99  | assert a and [] and False and []  # SIM223
100 100 | 
101     |-if (a and [] and False and []) or (a and [] and False and []):  # SIM223
    101 |+if (a and [] and False and []) or (False):  # SIM223
102 102 |     pass
103 103 | 
104 104 | 0 if a and [] and False and [] else 1  # SIM222

SIM223.py:104:6: SIM223 [*] Use `False` instead of `... and False and ...`
    |
104 |     pass
105 | 
106 | 0 if a and [] and False and [] else 1  # SIM222
    |      ^^^^^^^^^^^^^^^^^^^^^^^^^ SIM223
107 | 
108 | while a and [] and False and []:  # SIM223
    |
    = help: Replace with `False`

ℹ Suggested fix
101 101 | if (a and [] and False and []) or (a and [] and False and []):  # SIM223
102 102 |     pass
103 103 | 
104     |-0 if a and [] and False and [] else 1  # SIM222
    104 |+0 if False else 1  # SIM222
105 105 | 
106 106 | while a and [] and False and []:  # SIM223
107 107 |     pass

SIM223.py:106:7: SIM223 [*] Use `False` instead of `... and False and ...`
    |
106 | 0 if a and [] and False and [] else 1  # SIM222
107 | 
108 | while a and [] and False and []:  # SIM223
    |       ^^^^^^^^^^^^^^^^^^^^^^^^^ SIM223
109 |     pass
    |
    = help: Replace with `False`

ℹ Suggested fix
103 103 | 
104 104 | 0 if a and [] and False and [] else 1  # SIM222
105 105 | 
106     |-while a and [] and False and []:  # SIM223
    106 |+while False:  # SIM223
107 107 |     pass
108 108 | 
109 109 | [

SIM223.py:113:8: SIM223 [*] Use `False` instead of `... and False and ...`
    |
113 |     for a in range(10)
114 |     for b in range(10)
115 |     if a and [] and False and []  # SIM223
    |        ^^^^^^^^^^^^^^^^^^^^^^^^^ SIM223
116 |     if b and [] and False and []  # SIM223
117 | ]
    |
    = help: Replace with `False`

ℹ Suggested fix
110 110 |     0
111 111 |     for a in range(10)
112 112 |     for b in range(10)
113     |-    if a and [] and False and []  # SIM223
    113 |+    if False  # SIM223
114 114 |     if b and [] and False and []  # SIM223
115 115 | ]
116 116 | 

SIM223.py:114:8: SIM223 [*] Use `False` instead of `... and False and ...`
    |
114 |     for b in range(10)
115 |     if a and [] and False and []  # SIM223
116 |     if b and [] and False and []  # SIM223
    |        ^^^^^^^^^^^^^^^^^^^^^^^^^ SIM223
117 | ]
    |
    = help: Replace with `False`

ℹ Suggested fix
111 111 |     for a in range(10)
112 112 |     for b in range(10)
113 113 |     if a and [] and False and []  # SIM223
114     |-    if b and [] and False and []  # SIM223
    114 |+    if False  # SIM223
115 115 | ]
116 116 | 
117 117 | {

SIM223.py:121:8: SIM223 [*] Use `False` instead of `... and False and ...`
    |
121 |     for a in range(10)
122 |     for b in range(10)
123 |     if a and [] and False and []  # SIM223
    |        ^^^^^^^^^^^^^^^^^^^^^^^^^ SIM223
124 |     if b and [] and False and []  # SIM223
125 | }
    |
    = help: Replace with `False`

ℹ Suggested fix
118 118 |     0
119 119 |     for a in range(10)
120 120 |     for b in range(10)
121     |-    if a and [] and False and []  # SIM223
    121 |+    if False  # SIM223
122 122 |     if b and [] and False and []  # SIM223
123 123 | }
124 124 | 

SIM223.py:122:8: SIM223 [*] Use `False` instead of `... and False and ...`
    |
122 |     for b in range(10)
123 |     if a and [] and False and []  # SIM223
124 |     if b and [] and False and []  # SIM223
    |        ^^^^^^^^^^^^^^^^^^^^^^^^^ SIM223
125 | }
    |
    = help: Replace with `False`

ℹ Suggested fix
119 119 |     for a in range(10)
120 120 |     for b in range(10)
121 121 |     if a and [] and False and []  # SIM223
122     |-    if b and [] and False and []  # SIM223
    122 |+    if False  # SIM223
123 123 | }
124 124 | 
125 125 | {

SIM223.py:129:8: SIM223 [*] Use `False` instead of `... and False and ...`
    |
129 |     for a in range(10)
130 |     for b in range(10)
131 |     if a and [] and False and []  # SIM223
    |        ^^^^^^^^^^^^^^^^^^^^^^^^^ SIM223
132 |     if b and [] and False and []  # SIM223
133 | }
    |
    = help: Replace with `False`

ℹ Suggested fix
126 126 |     0: 0
127 127 |     for a in range(10)
128 128 |     for b in range(10)
129     |-    if a and [] and False and []  # SIM223
    129 |+    if False  # SIM223
130 130 |     if b and [] and False and []  # SIM223
131 131 | }
132 132 | 

SIM223.py:130:8: SIM223 [*] Use `False` instead of `... and False and ...`
    |
130 |     for b in range(10)
131 |     if a and [] and False and []  # SIM223
132 |     if b and [] and False and []  # SIM223
    |        ^^^^^^^^^^^^^^^^^^^^^^^^^ SIM223
133 | }
    |
    = help: Replace with `False`

ℹ Suggested fix
127 127 |     for a in range(10)
128 128 |     for b in range(10)
129 129 |     if a and [] and False and []  # SIM223
130     |-    if b and [] and False and []  # SIM223
    130 |+    if False  # SIM223
131 131 | }
132 132 | 
133 133 | (

SIM223.py:137:8: SIM223 [*] Use `False` instead of `... and False and ...`
    |
137 |     for a in range(10)
138 |     for b in range(10)
139 |     if a and [] and False and []  # SIM223
    |        ^^^^^^^^^^^^^^^^^^^^^^^^^ SIM223
140 |     if b and [] and False and []  # SIM223
141 | )
    |
    = help: Replace with `False`

ℹ Suggested fix
134 134 |     0
135 135 |     for a in range(10)
136 136 |     for b in range(10)
137     |-    if a and [] and False and []  # SIM223
    137 |+    if False  # SIM223
138 138 |     if b and [] and False and []  # SIM223
139 139 | )
140 140 | 

SIM223.py:138:8: SIM223 [*] Use `False` instead of `... and False and ...`
    |
138 |     for b in range(10)
139 |     if a and [] and False and []  # SIM223
140 |     if b and [] and False and []  # SIM223
    |        ^^^^^^^^^^^^^^^^^^^^^^^^^ SIM223
141 | )
    |
    = help: Replace with `False`

ℹ Suggested fix
135 135 |     for a in range(10)
136 136 |     for b in range(10)
137 137 |     if a and [] and False and []  # SIM223
138     |-    if b and [] and False and []  # SIM223
    138 |+    if False  # SIM223
139 139 | )
140 140 | 
141 141 | # Outside test `a` is not simplified.

SIM223.py:143:7: SIM223 [*] Use `[]` instead of `[] and ...`
    |
143 | # Outside test `a` is not simplified.
144 | 
145 | a and [] and False and []  # SIM223
    |       ^^^^^^^^^^^^^^^^^^^ SIM223
146 | 
147 | if (a and [] and False and []) == (a and []):  # SIM223
    |
    = help: Replace with `[]`

ℹ Suggested fix
140 140 | 
141 141 | # Outside test `a` is not simplified.
142 142 | 
143     |-a and [] and False and []  # SIM223
    143 |+a and []  # SIM223
144 144 | 
145 145 | if (a and [] and False and []) == (a and []):  # SIM223
146 146 |     pass

SIM223.py:145:11: SIM223 [*] Use `[]` instead of `[] and ...`
    |
145 | a and [] and False and []  # SIM223
146 | 
147 | if (a and [] and False and []) == (a and []):  # SIM223
    |           ^^^^^^^^^^^^^^^^^^^ SIM223
148 |     pass
    |
    = help: Replace with `[]`

ℹ Suggested fix
142 142 | 
143 143 | a and [] and False and []  # SIM223
144 144 | 
145     |-if (a and [] and False and []) == (a and []):  # SIM223
    145 |+if (a and []) == (a and []):  # SIM223
146 146 |     pass
147 147 | 
148 148 | if f(a and [] and False and []):  # SIM223

SIM223.py:148:12: SIM223 [*] Use `[]` instead of `[] and ...`
    |
148 |     pass
149 | 
150 | if f(a and [] and False and []):  # SIM223
    |            ^^^^^^^^^^^^^^^^^^^ SIM223
151 |     pass
    |
    = help: Replace with `[]`

ℹ Suggested fix
145 145 | if (a and [] and False and []) == (a and []):  # SIM223
146 146 |     pass
147 147 | 
148     |-if f(a and [] and False and []):  # SIM223
    148 |+if f(a and []):  # SIM223
149 149 |     pass


