---
source: crates/ruff_linter/src/rules/pylint/mod.rs
---
invalid_return_type_str.py:6:16: PLE0307 `__str__` does not return `str`
  |
4 | class Float:
5 |     def __str__(self):
6 |         return 3.05
  |                ^^^^ PLE0307
  |

invalid_return_type_str.py:11:16: PLE0307 `__str__` does not return `str`
   |
 9 | class Int:
10 |     def __str__(self):
11 |         return 1
   |                ^ PLE0307
   |

invalid_return_type_str.py:16:16: PLE0307 `__str__` does not return `str`
   |
14 | class Int2:
15 |     def __str__(self):
16 |         return 0
   |                ^ PLE0307
   |

invalid_return_type_str.py:21:16: PLE0307 `__str__` does not return `str`
   |
19 | class Bool:
20 |     def __str__(self):
21 |         return False
   |                ^^^^^ PLE0307
   |
