---
source: crates/ruff_linter/src/rules/pylint/mod.rs
---
PLR0124 Name compared with itself, consider replacing `foo == foo`
 --> comparison_with_itself.py:2:1
  |
1 | # Errors.
2 | foo == foo
  | ^^^
3 |
4 | foo != foo
  |

PLR0124 Name compared with itself, consider replacing `foo != foo`
 --> comparison_with_itself.py:4:1
  |
2 | foo == foo
3 |
4 | foo != foo
  | ^^^
5 |
6 | foo > foo
  |

PLR0124 Name compared with itself, consider replacing `foo > foo`
 --> comparison_with_itself.py:6:1
  |
4 | foo != foo
5 |
6 | foo > foo
  | ^^^
7 |
8 | foo >= foo
  |

PLR0124 Name compared with itself, consider replacing `foo >= foo`
  --> comparison_with_itself.py:8:1
   |
 6 | foo > foo
 7 |
 8 | foo >= foo
   | ^^^
 9 |
10 | foo < foo
   |

PLR0124 Name compared with itself, consider replacing `foo < foo`
  --> comparison_with_itself.py:10:1
   |
 8 | foo >= foo
 9 |
10 | foo < foo
   | ^^^
11 |
12 | foo <= foo
   |

PLR0124 Name compared with itself, consider replacing `foo <= foo`
  --> comparison_with_itself.py:12:1
   |
10 | foo < foo
11 |
12 | foo <= foo
   | ^^^
13 |
14 | foo is foo
   |

PLR0124 Name compared with itself, consider replacing `foo is foo`
  --> comparison_with_itself.py:14:1
   |
12 | foo <= foo
13 |
14 | foo is foo
   | ^^^
15 |
16 | foo is not foo
   |

PLR0124 Name compared with itself, consider replacing `foo is not foo`
  --> comparison_with_itself.py:16:1
   |
14 | foo is foo
15 |
16 | foo is not foo
   | ^^^
17 |
18 | foo in foo
   |

PLR0124 Name compared with itself, consider replacing `foo in foo`
  --> comparison_with_itself.py:18:1
   |
16 | foo is not foo
17 |
18 | foo in foo
   | ^^^
19 |
20 | foo not in foo
   |

PLR0124 Name compared with itself, consider replacing `foo not in foo`
  --> comparison_with_itself.py:20:1
   |
18 | foo in foo
19 |
20 | foo not in foo
   | ^^^
21 |
22 | id(foo) == id(foo)
   |

PLR0124 Name compared with itself, consider replacing `id(foo) == id(foo)`
  --> comparison_with_itself.py:22:1
   |
20 | foo not in foo
21 |
22 | id(foo) == id(foo)
   | ^^^^^^^
23 |
24 | len(foo) == len(foo)
   |

PLR0124 Name compared with itself, consider replacing `len(foo) == len(foo)`
  --> comparison_with_itself.py:24:1
   |
22 | id(foo) == id(foo)
23 |
24 | len(foo) == len(foo)
   | ^^^^^^^^
25 |
26 | # Non-errors.
   |
