---
source: crates/ruff_linter/src/rules/pylint/mod.rs
---
PLR1711 [*] Useless `return` statement at end of function
 --> useless_return.py:6:5
  |
4 | def print_python_version():
5 |     print(sys.version)
6 |     return None  # [useless-return]
  |     ^^^^^^^^^^^
  |
help: Remove useless `return` statement
  |
5 |     print(sys.version)
  -     return None  # [useless-return]
6 |
  |

PLR1711 [*] Useless `return` statement at end of function
  --> useless_return.py:11:5
   |
 9 | def print_python_version():
10 |     print(sys.version)
11 |     return None  # [useless-return]
   |     ^^^^^^^^^^^
   |
help: Remove useless `return` statement
   |
10 |     print(sys.version)
   -     return None  # [useless-return]
11 |
   |

PLR1711 [*] Useless `return` statement at end of function
  --> useless_return.py:16:5
   |
14 | def print_python_version():
15 |     print(sys.version)
16 |     return None  # [useless-return]
   |     ^^^^^^^^^^^
   |
help: Remove useless `return` statement
   |
15 |     print(sys.version)
   -     return None  # [useless-return]
16 |
   |

PLR1711 [*] Useless `return` statement at end of function
  --> useless_return.py:22:9
   |
20 |     def print_python_version(self):
21 |         print(sys.version)
22 |         return None  # [useless-return]
   |         ^^^^^^^^^^^
   |
help: Remove useless `return` statement
   |
21 |         print(sys.version)
   -         return None  # [useless-return]
22 |
   |

PLR1711 [*] Useless `return` statement at end of function
  --> useless_return.py:50:5
   |
48 |     """This function returns None."""
49 |     print(sys.version)
50 |     return None  # [useless-return]
   |     ^^^^^^^^^^^
   |
help: Remove useless `return` statement
   |
49 |     print(sys.version)
   -     return None  # [useless-return]
50 |
   |

PLR1711 [*] Useless `return` statement at end of function
  --> useless_return.py:60:9
   |
58 |     def get(self, key: str) -> None:
59 |         print(f"{key} not found")
60 |         return None
   |         ^^^^^^^^^^^
   |
help: Remove useless `return` statement
   |
59 |         print(f"{key} not found")
   -         return None
   |
