o
    g                     @   sh   d Z ddlZddlmZ ddlmZ ddlmZmZmZ ddl	m
Z
 ddiZG d	d
 d
eZdd ZdS )z+check for new / old style related problems
    N)nodes)BaseChecker)check_messageshas_known_basesnode_frame_class)IAstroidCheckerE1003)z&Bad first argument %r given to super()bad-super-callzbUsed when another argument than the current class is given as first argument of the super builtin.c                   @   sF   e Zd ZdZefZdZeZdZ	dZ
eddejddfd	d
ZeZdS )NewStyleConflictCheckerzchecks for usage of new style capabilities on old style classes and
    other new/old styles conflicts problems
    * use of property, __slots__, super
    * "super" usage
    newstyle r	   nodereturnNc           	   	   C   s  |  sdS |j }|tjD ]}t|t|krq|j}t|tj	s&q|j
}t|tjr<t|jtjr<|jjdks=q|jsDt|s|jsHq|jd }t|tjrit|jtjri|jjdkri| jd|dd qt|jdkrt|jd	 tjr|jd	 jd
krt|tj	r|jdkr| jd|dd qz|jot|jd  d}W n
 tjy   Y qw ||urd}|r|j}n|jrt|jd dr|jd j}|r| jd||fd qdS )zcheck use of superNsuperr   typer	   )r   )r   args      self	__class__)zself.__class__name)	is_methodparentframenodes_of_classr   Callr   func
isinstance	AttributeexprNamer   r   r   r   add_messagelenattrnamenextinferastroidInferenceErrorhasattr)	r   r   klassstmtr    callarg0supclsr   r   r   V/home/ubuntu/cloudmapper/venv/lib/python3.10/site-packages/pylint/checkers/newstyle.pyvisit_functiondef;   sj   





z)NewStyleConflictChecker.visit_functiondef)__name__
__module____qualname____doc__r   __implements__r   MSGSmsgspriorityoptionsr   r   FunctionDefr0   visit_asyncfunctiondefr   r   r   r/   r
   *   s    Hr
   c                 C   s   |  t|  dS )z-required method to auto register this checkerN)register_checkerr
   )linterr   r   r/   register   s   r>   )r4   r'   r   pylint.checkersr   pylint.checkers.utilsr   r   r   pylint.interfacesr   r6   r
   r>   r   r   r   r/   <module>   s   
]