---
source: crates/ruff_linter/src/rules/flake8_bugbear/mod.rs
snapshot_kind: text
---
B015.py:3:1: B015 Pointless comparison. Did you mean to assign a value? Otherwise, prepend `assert` or remove it.
  |
1 | assert 1 == 1
2 | 
3 | 1 == 1
  | ^^^^^^ B015
4 | 
5 | assert 1 in (1, 2)
  |

B015.py:7:1: B015 Pointless comparison. Did you mean to assign a value? Otherwise, prepend `assert` or remove it.
  |
5 | assert 1 in (1, 2)
6 | 
7 | 1 in (1, 2)
  | ^^^^^^^^^^^ B015
  |

B015.py:17:5: B015 Pointless comparison at end of function scope. Did you mean to return the expression result?
   |
15 |     assert 1 in (1, 2)
16 | 
17 |     1 in (1, 2)
   |     ^^^^^^^^^^^ B015
   |

B015.py:21:5: B015 Pointless comparison. Did you mean to assign a value? Otherwise, prepend `assert` or remove it.
   |
20 | def test2():
21 |     1 in (1, 2)
   |     ^^^^^^^^^^^ B015
22 |     return
   |

B015.py:29:5: B015 Pointless comparison. Did you mean to assign a value? Otherwise, prepend `assert` or remove it.
   |
28 | class TestClass:
29 |     1 == 1
   |     ^^^^^^ B015
   |
