---
source: crates/ruff/src/rules/pylint/mod.rs
---
magic_value_comparison.py:5:4: PLR2004 Magic value used in comparison, consider replacing 10 with a constant variable
  |
5 | user_input = 10
6 | 
7 | if 10 > user_input:  # [magic-value-comparison]
  |    ^^ PLR2004
8 |     pass
  |

magic_value_comparison.py:38:12: PLR2004 Magic value used in comparison, consider replacing 2 with a constant variable
   |
38 |     pass
39 | 
40 | if argc != 2:  # [magic-value-comparison]
   |            ^ PLR2004
41 |     pass
   |

magic_value_comparison.py:41:12: PLR2004 Magic value used in comparison, consider replacing -2 with a constant variable
   |
41 |     pass
42 | 
43 | if argc != -2:  # [magic-value-comparison]
   |            ^^ PLR2004
44 |     pass
   |

magic_value_comparison.py:44:12: PLR2004 Magic value used in comparison, consider replacing +2 with a constant variable
   |
44 |     pass
45 | 
46 | if argc != +2:  # [magic-value-comparison]
   |            ^^ PLR2004
47 |     pass
   |

magic_value_comparison.py:65:21: PLR2004 Magic value used in comparison, consider replacing 3.141592653589793 with a constant variable
   |
65 | pi_estimation = 3.14
66 | 
67 | if pi_estimation == 3.141592653589793238:  # [magic-value-comparison]
   |                     ^^^^^^^^^^^^^^^^^^^^ PLR2004
68 |     pass
   |


