---
source: crates/ruff_linter/src/rules/flake8_bugbear/mod.rs
---
B011 [*] Do not `assert False` (`python -O` removes these calls), raise `AssertionError()`
  --> B011.py:8:8
   |
 7 | assert 1 != 2
 8 | assert False
   |        ^^^^^
 9 | assert 1 != 2, "message"
10 | assert False, "message"
   |
help: Replace `assert False`
  |
7 | assert 1 != 2
  - assert False
8 + raise AssertionError()
9 | assert 1 != 2, "message"
  |
note: This is an unsafe fix and may change runtime behavior

B011 [*] Do not `assert False` (`python -O` removes these calls), raise `AssertionError()`
  --> B011.py:10:8
   |
 8 | assert False
 9 | assert 1 != 2, "message"
10 | assert False, "message"
   |        ^^^^^
   |
help: Replace `assert False`
   |
9  | assert 1 != 2, "message"
   - assert False, "message"
10 + raise AssertionError("message")
   |
note: This is an unsafe fix and may change runtime behavior
