Method: pylint.extensions.eq_without_hash.EqWithoutHash.visit_classdef
Calls: 1, Exceptions: 0, Paths: 1Back
Path 1: 1 calls (1.0)
ClassDef (1)
1@utils.only_required_for_messages("eq-without-hash")
2 def visit_classdef(self, node: nodes.ClassDef) -> None:
3 locals_and_methods = set(node.locals).union(x.name for x in node.mymethods())
4 if "__eq__" in locals_and_methods and "__hash__" not in locals_and_methods:
5 self.add_message("eq-without-hash", node=node, confidence=interfaces.HIGH)