o
    b+                     @   sr   d Z ddl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dd	d
difdZG dd deZdd ZdS )z+check for new / old style related problems
    N)IAstroidChecker)BaseChecker)check_messagesnode_frame_classhas_known_bases)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.zMissing argument to super()missing-super-argumentz7Used when the super builtin didn't receive an argument.Z
maxversion)   r   )ZE1003ZE1004c                   @   s<   e Zd ZdZefZdZeZdZ	dZ
edd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   r   c           	   	   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sEt|rEq|jsXtjd dkrPq| jd|d q|jd }t|tjryt|jtjry|jjdkry| 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   r	   r   )nodetyper   )r   )r   args      self	__class__)zself.__class__name)Z	is_methodparentframeZnodes_of_classastroidCallr   func
isinstance	AttributeexprNamer   r   r   r   sysversion_infoZadd_messagelenattrnamenextZinferZInferenceErrorhasattr)	r   r   klassstmtr   callZarg0Zsupclsr   r   r   W/var/www/secure340b-portal/env/lib/python3.10/site-packages/pylint/checkers/newstyle.pyvisit_functiondef9   s|   






z)NewStyleConflictChecker.visit_functiondefN)__name__
__module____qualname____doc__r   Z__implements__r   MSGSZmsgspriorityoptionsr   r*   Zvisit_asyncfunctiondefr   r   r   r)   r
   (   s    
Or
   c                 C   s   |  t|  dS )z.required method to auto register this checker N)Zregister_checkerr
   )Zlinterr   r   r)   register   s   r2   )r.   r    r   Zpylint.interfacesr   Zpylint.checkersr   Zpylint.checkers.utilsr   r   r   r/   r
   r2   r   r   r   r)   <module>   s   d