o
    ýÑÐb  ã                   @   s:   d Z ddlmZ G dd„ deƒZdd„ ZG dd„ dƒZd	S )
z*Warning about assigning self/cls variable.é    )Úprint_functionc                   @   s8   e Zd ZdZdd„ Zdd„ Zedd„ ƒZedd	„ ƒZ	d
S )ÚFooz5Class with methods that check for self/cls assignmentc                 C   ó   d} dS )z$Instance method, should warn for baré
   N© )Úbar_r   r   úi/var/www/secure340b-portal/env/lib/python3.10/site-packages/pylint/test/functional/self_cls_assignment.pyÚself_foo	   ó   zFoo.self_fooc                 C   ó   |} dS )z%Instance method, should warn for selfNr   )ÚselfÚlalar   r   r   Úself_foofoo   r
   zFoo.self_foofooc                 C   r   )z!Class method, should warn for clsÚtadaNr   )Úclsr   r   r   Úcls_foo   ó   zFoo.cls_fooc                 C   r   )zStatic method, no warningsr   Nr   )r   r   r   r   Ú
static_foo   r   zFoo.static_fooN)
Ú__name__Ú
__module__Ú__qualname__Ú__doc__r	   r   Úclassmethodr   Ústaticmethodr   r   r   r   r   r      s    
r   c                 C   r   )zFree function, no warningsNr   )r   r   r   r   r   Úfree_foo   r
   r   c                   @   s   e Zd ZdZdd„ ZdS )ÚTestNonLocalz*Test class for nonlocal assignment of selfc                    s   ‡ fdd„}||ƒ ˆ S )z,This function uses nonlocal to reassign selfc                    s   | ‰ d S )Nr   )Úparam©r   r   r   Ú
_set_param*   r
   z)TestNonLocal.function.<locals>._set_paramr   )r   r   r   r   r   r   Úfunction'   s   zTestNonLocal.functionN)r   r   r   r   r   r   r   r   r   r   $   s    r   N)r   Ú
__future__r   Úobjectr   r   r   r   r   r   r   Ú<module>   s
    