
    e                     v    d Z ddlmZ ddlmZmZ ddlmZ ddlm	Z	  G d dej                        Zde	d	d
fdZy
)zThis is the remnant of the python3 checker.

It was removed because the transition from python 2 to python3 is
behind us, but some checks are still useful in python3 after all.
See https://github.com/pylint-dev/pylint/issues/5025
    )nodes)checkers
interfaces)utils)PyLinterc                   f    e Zd ZdZddiZ ej                  d      dej                  ddfd       Z	y)EqWithoutHasheq-without-hashW1641)z6Implementing __eq__ without also implementing __hash__r
   zUsed when a class implements __eq__ but not __hash__. Objects get None as their default __hash__ implementation if they also implement __eq__.nodereturnNc                     t        |j                        j                  d |j                         D              }d|v r(d|vr#| j	                  d|t
        j                         y y y )Nc              3   4   K   | ]  }|j                     y wN)name).0xs     C/usr/lib/python3/dist-packages/pylint/extensions/eq_without_hash.py	<genexpr>z/EqWithoutHash.visit_classdef.<locals>.<genexpr>!   s     3UqAFF3Us   __eq____hash__r
   )r   
confidence)setlocalsunion	mymethodsadd_messager   HIGH)selfr   locals_and_methodss      r   visit_classdefzEqWithoutHash.visit_classdef   s]     -333UDNNDT3UU))j@R.R.TjooV /S)    )
__name__
__module____qualname__r   msgsr   only_required_for_messagesr   ClassDefr!    r"   r   r	   r	      sP    D 	 
D &U%%&78W5>> Wd W 9Wr"   r	   linterr   Nc                 8    | j                  t        |              y r   )register_checkerr	   )r*   s    r   registerr-   &   s    
M&12r"   )__doc__astroidr   pylintr   r   pylint.checkersr   pylint.lintr   BaseCheckerr	   r-   r)   r"   r   <module>r4      s?   
  ' !  WH(( W&3X 3$ 3r"   