---
source: crates/ruff/src/rules/flake8_simplify/mod.rs
---
SIM210.py:1:5: SIM210 [*] Use `bool(b)` instead of `True if b else False`
  |
1 | a = True if b else False  # SIM210
  |     ^^^^^^^^^^^^^^^^^^^^ SIM210
2 | 
3 | a = True if b != c else False  # SIM210
  |
  = help: Replace with `not b

ℹ Suggested fix
1   |-a = True if b else False  # SIM210
  1 |+a = bool(b)  # SIM210
2 2 | 
3 3 | a = True if b != c else False  # SIM210
4 4 | 

SIM210.py:3:5: SIM210 [*] Use `bool(b != c)` instead of `True if b != c else False`
  |
3 | a = True if b else False  # SIM210
4 | 
5 | a = True if b != c else False  # SIM210
  |     ^^^^^^^^^^^^^^^^^^^^^^^^^ SIM210
6 | 
7 | a = True if b + c else False  # SIM210
  |
  = help: Replace with `not b != c

ℹ Suggested fix
1 1 | a = True if b else False  # SIM210
2 2 | 
3   |-a = True if b != c else False  # SIM210
  3 |+a = b != c  # SIM210
4 4 | 
5 5 | a = True if b + c else False  # SIM210
6 6 | 

SIM210.py:5:5: SIM210 [*] Use `bool(b + c)` instead of `True if b + c else False`
  |
5 | a = True if b != c else False  # SIM210
6 | 
7 | a = True if b + c else False  # SIM210
  |     ^^^^^^^^^^^^^^^^^^^^^^^^ SIM210
8 | 
9 | a = False if b else True  # OK
  |
  = help: Replace with `not b + c

ℹ Suggested fix
2 2 | 
3 3 | a = True if b != c else False  # SIM210
4 4 | 
5   |-a = True if b + c else False  # SIM210
  5 |+a = bool(b + c)  # SIM210
6 6 | 
7 7 | a = False if b else True  # OK
8 8 | 

SIM210.py:14:9: SIM210 [*] Use `bool(b)` instead of `True if b else False`
   |
14 |         return False
15 | 
16 |     a = True if b else False
   |         ^^^^^^^^^^^^^^^^^^^^ SIM210
   |
   = help: Replace with `not b


