---
source: crates/ruff_linter/src/rules/pylint/mod.rs
---
PLR2004 Magic value used in comparison, consider replacing `-2.0` with a constant variable
  --> magic_value_comparison.py:56:12
   |
54 |     pass
55 |
56 | if argc != -2.0:  # [magic-value-comparison]
   |            ^^^^
57 |     pass
   |

PLR2004 Magic value used in comparison, consider replacing `+2.0` with a constant variable
  --> magic_value_comparison.py:59:12
   |
57 |     pass
58 |
59 | if argc != +2.0:  # [magic-value-comparison]
   |            ^^^^
60 |     pass
   |

PLR2004 Magic value used in comparison, consider replacing `"Hunter2"` with a constant variable
  --> magic_value_comparison.py:74:22
   |
72 |     pass
73 |
74 | if input_password == "Hunter2":  # correct
   |                      ^^^^^^^^^
75 |     pass
   |

PLR2004 Magic value used in comparison, consider replacing `3.141592653589793238` with a constant variable
  --> magic_value_comparison.py:80:21
   |
78 | pi_estimation = 3.14
79 |
80 | if pi_estimation == 3.141592653589793238:  # [magic-value-comparison]
   |                     ^^^^^^^^^^^^^^^^^^^^
81 |     pass
   |

PLR2004 Magic value used in comparison, consider replacing `b"something"` with a constant variable
  --> magic_value_comparison.py:92:18
   |
90 | user_input = b"Hello, There!"
91 |
92 | if user_input == b"something":  # correct
   |                  ^^^^^^^^^^^^
93 |     pass
   |
