Generate ``__hash__`` method.
(attrs: List[str], **kwargs: Any)
| 155 | |
| 156 | |
| 157 | def HashMethod(attrs: List[str], **kwargs: Any) -> Callable[[], None]: |
| 158 | """Generate ``__hash__`` method.""" |
| 159 | self_tuple = obj_attrs_tuple("self", attrs) |
| 160 | return Method("__hash__", [], [f"return hash({self_tuple})"], **kwargs) |
| 161 | |
| 162 | |
| 163 | def EqMethod(fields: List[str], **kwargs: Any) -> Callable[[], None]: |
nothing calls this directly
no test coverage detected