---
source: crates/ruff_linter/src/rules/flake8_bugbear/mod.rs
---
B011.py:8:8: B011 [*] Do not `assert False` (`python -O` removes these calls), raise `AssertionError()`
   |
 7 | assert 1 != 2
 8 | assert False
   |        ^^^^^ B011
 9 | assert 1 != 2, "message"
10 | assert False, "message"
   |
   = help: Replace `assert False`

ℹ Unsafe fix
5 5 | """
6 6 | 
7 7 | assert 1 != 2
8   |-assert False
  8 |+raise AssertionError()
9 9 | assert 1 != 2, "message"
10 10 | assert False, "message"

B011.py:10:8: B011 [*] Do not `assert False` (`python -O` removes these calls), raise `AssertionError()`
   |
 8 | assert False
 9 | assert 1 != 2, "message"
10 | assert False, "message"
   |        ^^^^^ B011
   |
   = help: Replace `assert False`

ℹ Unsafe fix
7  7  | assert 1 != 2
8  8  | assert False
9  9  | assert 1 != 2, "message"
10    |-assert False, "message"
   10 |+raise AssertionError("message")


