---
source: crates/ruff_linter/src/rules/pylint/mod.rs
---
PLE0309 `__hash__` does not return an integer
 --> invalid_return_type_hash.py:6:16
  |
4 | class Bool:
5 |     def __hash__(self):
6 |         return True  # [invalid-hash-return]
  |                ^^^^
  |

PLE0309 `__hash__` does not return an integer
  --> invalid_return_type_hash.py:11:16
   |
 9 | class Float:
10 |     def __hash__(self):
11 |         return 3.05  # [invalid-hash-return]
   |                ^^^^
   |

PLE0309 `__hash__` does not return an integer
  --> invalid_return_type_hash.py:16:16
   |
14 | class Str:
15 |     def __hash__(self):
16 |         return "ruff"  # [invalid-hash-return]
   |                ^^^^^^
   |

PLE0309 `__hash__` does not return an integer
  --> invalid_return_type_hash.py:20:9
   |
19 | class HashNoReturn:
20 |     def __hash__(self):
   |         ^^^^^^^^
21 |         print("ruff")  # [invalid-hash-return]
   |
