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

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

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

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

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

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

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

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

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

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


