---
source: crates/ruff_linter/src/rules/pylint/mod.rs
---
PLR0133 Two constants compared in a comparison, consider replacing `100 == 100`
 --> comparison_of_constant.py:3:4
  |
1 | """Check that magic values are not used in comparisons"""
2 |
3 | if 100 == 100: # [comparison-of-constants]
  |    ^^^
4 |     pass
  |

PLR0133 Two constants compared in a comparison, consider replacing `1 == 3`
 --> comparison_of_constant.py:6:4
  |
4 |     pass
5 |
6 | if 1 == 3: # [comparison-of-constants]
  |    ^
7 |     pass
  |

PLR0133 Two constants compared in a comparison, consider replacing `1 != 3`
  --> comparison_of_constant.py:9:4
   |
 7 |     pass
 8 |
 9 | if 1 != 3: # [comparison-of-constants]
   |    ^
10 |     pass
   |

PLR0133 Two constants compared in a comparison, consider replacing `4 == 3`
  --> comparison_of_constant.py:13:4
   |
12 | x = 0
13 | if 4 == 3 == x: # [comparison-of-constants]
   |    ^
14 |     pass
   |

PLR0133 Two constants compared in a comparison, consider replacing `1 > 0`
  --> comparison_of_constant.py:23:4
   |
21 |     pass
22 |
23 | if 1 > 0: # [comparison-of-constants]
   |    ^
24 |     pass
   |

PLR0133 Two constants compared in a comparison, consider replacing `1 >= 0`
  --> comparison_of_constant.py:29:4
   |
27 |     pass
28 |
29 | if 1 >= 0: # [comparison-of-constants]
   |    ^
30 |     pass
   |

PLR0133 Two constants compared in a comparison, consider replacing `1 < 0`
  --> comparison_of_constant.py:35:4
   |
33 |     pass
34 |
35 | if 1 < 0: # [comparison-of-constants]
   |    ^
36 |     pass
   |

PLR0133 Two constants compared in a comparison, consider replacing `1 <= 0`
  --> comparison_of_constant.py:41:4
   |
39 |     pass
40 |
41 | if 1 <= 0: # [comparison-of-constants]
   |    ^
42 |     pass
   |

PLR0133 Two constants compared in a comparison, consider replacing `"hello" == ""`
  --> comparison_of_constant.py:51:4
   |
49 |     pass
50 |
51 | if "hello" == "": # [comparison-of-constants]
   |    ^^^^^^^
52 |     pass
   |

PLR0133 Two constants compared in a comparison, consider replacing `True == False`
  --> comparison_of_constant.py:58:4
   |
56 |     pass
57 |
58 | if True == False: # [comparison-of-constants]
   |    ^^^^
59 |     pass
   |
