---
source: crates/ruff_linter/src/rules/flake8_simplify/mod.rs
---
SIM208.py:1:4: SIM208 [*] Use `a` instead of `not (not a)`
  |
1 | if not (not a):  # SIM208
  |    ^^^^^^^^^^^ SIM208
2 |     pass
  |
  = help: Replace with `a`

ℹ Safe fix
1   |-if not (not a):  # SIM208
  1 |+if a:  # SIM208
2 2 |     pass
3 3 | 
4 4 | if not (not (a == b)):  # SIM208

SIM208.py:4:4: SIM208 [*] Use `a == b` instead of `not (not a == b)`
  |
2 |     pass
3 | 
4 | if not (not (a == b)):  # SIM208
  |    ^^^^^^^^^^^^^^^^^^ SIM208
5 |     pass
  |
  = help: Replace with `a == b`

ℹ Safe fix
1 1 | if not (not a):  # SIM208
2 2 |     pass
3 3 | 
4   |-if not (not (a == b)):  # SIM208
  4 |+if a == b:  # SIM208
5 5 |     pass
6 6 | 
7 7 | if not a:  # OK

SIM208.py:16:5: SIM208 [*] Use `b` instead of `not (not b)`
   |
14 |     pass
15 | 
16 | a = not not b  # SIM208
   |     ^^^^^^^^^ SIM208
17 | 
18 | f(not not a)  # SIM208
   |
   = help: Replace with `b`

ℹ Safe fix
13 13 | if not a != b:  # OK
14 14 |     pass
15 15 | 
16    |-a = not not b  # SIM208
   16 |+a = bool(b)  # SIM208
17 17 | 
18 18 | f(not not a)  # SIM208
19 19 | 

SIM208.py:18:3: SIM208 [*] Use `a` instead of `not (not a)`
   |
16 | a = not not b  # SIM208
17 | 
18 | f(not not a)  # SIM208
   |   ^^^^^^^^^ SIM208
19 | 
20 | if 1 + (not (not a)):  # SIM208
   |
   = help: Replace with `a`

ℹ Safe fix
15 15 | 
16 16 | a = not not b  # SIM208
17 17 | 
18    |-f(not not a)  # SIM208
   18 |+f(bool(a))  # SIM208
19 19 | 
20 20 | if 1 + (not (not a)):  # SIM208
21 21 |     pass

SIM208.py:20:9: SIM208 [*] Use `a` instead of `not (not a)`
   |
18 | f(not not a)  # SIM208
19 | 
20 | if 1 + (not (not a)):  # SIM208
   |         ^^^^^^^^^^^ SIM208
21 |     pass
   |
   = help: Replace with `a`

ℹ Safe fix
17 17 | 
18 18 | f(not not a)  # SIM208
19 19 | 
20    |-if 1 + (not (not a)):  # SIM208
   20 |+if 1 + (bool(a)):  # SIM208
21 21 |     pass


