---
source: crates/ruff/src/rules/pylint/mod.rs
---
unexpected_special_method_signature.py:5:9: PLE0302 The special method `__bool__` expects 1 parameter, 2 were given
  |
5 |         ...
6 |     
7 |     def __bool__(self, x):  # too many mandatory args
  |         ^^^^^^^^ PLE0302
8 |         ...
  |

unexpected_special_method_signature.py:22:9: PLE0302 The special method `__bool__` expects 0 parameters, 1 was given
   |
22 |     @staticmethod
23 |     def __bool__(x):  # too many mandatory args
   |         ^^^^^^^^ PLE0302
24 |         ...
   |

unexpected_special_method_signature.py:35:9: PLE0302 The special method `__eq__` expects 2 parameters, 1 was given
   |
35 |         ...
36 |     
37 |     def __eq__(self):  # too few mandatory args
   |         ^^^^^^ PLE0302
38 |         ...
   |

unexpected_special_method_signature.py:38:9: PLE0302 The special method `__eq__` expects 2 parameters, 3 were given
   |
38 |         ...
39 |     
40 |     def __eq__(self, other, other_other):  # too many mandatory args
   |         ^^^^^^ PLE0302
41 |         ...
   |

unexpected_special_method_signature.py:47:9: PLE0302 The special method `__round__` expects between 1 and 2 parameters, 3 were given
   |
47 |         ...
48 |     
49 |     def __round__(self, x, y):  # disallow 2 args
   |         ^^^^^^^^^ PLE0302
50 |         ...
   |

unexpected_special_method_signature.py:50:9: PLE0302 The special method `__round__` expects between 1 and 2 parameters, 4 were given
   |
50 |         ...
51 |     
52 |     def __round__(self, x, y, z=2):  # disallow 3 args even when one is optional
   |         ^^^^^^^^^ PLE0302
53 |         ...
   |


