o
    b                  
   @   s  d dl mZ dZedkreeefv red7 Zdd ZeeiZd ee< Zed7 ZefddZe	fd	d
Z
dd
 Zze W n eyG   dZY nw ze W n eyW   dZY nw ze W n   dZY eeee ze W n eyx   dZY nw ee dd Zdd Zedd edD ddd Zedd edD ddd Zedd
 dd ZefddZG d d! d!eZG d"d# d#eZG d$d% d%eZG d&d' d'eZG d(d) d)eZ e!Z"[!G d*d+ d+eZ#ze$ W n	 ey   Y nw ze% W n
 ey   Y nw ze& W n   Y ze' W n
 ey   Y nw ze(dd, e(y9 Z) z
ee) W Y d-Z)[)nd-Z)[)ww d.d/ Z*G d0d1 d1eZ+G d2d3 d3eZ,d4d5 Z-G d6d7 d7Z.G d8d9 d9Z/G d:d; d;Z0G d<d= d=Z1G d>d? d?Z2d@dA Z3d-S )B    )print_function   c                 C   s   t } | sJ dS )z
method docN)Znomoreknown)var r   h/var/www/secure340b-portal/env/lib/python3.10/site-packages/pylint/test/functional/undefined_variable.py	in_method   s   r   zmove this is astroid test$c                 C   s    t | | t t |d7 }~dS )z:function with defaut arg's value set to an unexistant namer   N)printZxxxx)r   defaultZaugvarZvardelr   r   r   bad_default   s   
r   c                 C   s   | | S Nr   xyr   r   r   <lambda>       r   c                 C   s   | t  S r   )zr   r   r   r   r      r   	somethingc                 C   s*   | dkr|dkr	 dS dS t | d}dS )Zhopr   r      Nr	   )r   Zxxxr   r   r   if_branch_test9   s   r   c                        fddS )zDecorator with one argument.c                      s   t  S r   )listr   argr   r   r   E   r   zdecorator.<locals>.<lambda>r   r   r   r   r   	decoratorC   s   r   c                 C   s   g | ]}|d  qS )   r   .0ir   r   r   
<listcomp>H   s    r       r   c                   C      dS )z5A function with a decorator that contains a listcomp.Nr   r   r   r   r   func1H       r#   c                 c   s    | ]}|d  V  qdS )r   Nr   r   r   r   r   	<genexpr>L   s    r%   c                   C   r"   )z4A function with a decorator that contains a genexpr.Nr   r   r   r   r   func2L   r$   r&   c                 C   s   | dkS )Nr   r   )r   r   r   r   r   P   r   c                   C   r"   )z3A function with a decorator that contains a lambda.Nr   r   r   r   r   mainP   r$   r'   c                 C      | S )z TestClass isn't defined yet. r   r   r   r   r   test_argumentsV      r)   c                   @   s0   e Zd ZdZG dd deZdd Zdd ZdS )		TestClassz; contains another class, which uses an undefined ancestor. c                   @      e Zd ZdZdS )zTestClass.MissingAncestor no op N__name__
__module____qualname____doc__r   r   r   r   MissingAncestor]       r3   c                 C   s$   G dd d|}G dd dt }|S )zV It should trigger here, because the two classes
        have the same scope.
        c                   @   r,   )z.TestClass.test1.<locals>.UsingBeforeDefinitionz uses Empty before definition Nr.   r   r   r   r   UsingBeforeDefinitiond   r4   r5   c                   @   r,   )zTestClass.test1.<locals>.Emptyr-   Nr.   r   r   r   r   Emptyf   r4   r6   )object)selfr6   r5   r   r   r   test1`   s   zTestClass.test1c                 C   s   G dd dt }|S )z0 Ancestor isn't defined yet, but we don't care. c                   @   r,   )z(TestClass.test.<locals>.MissingAncestor1r-   Nr.   r   r   r   r   MissingAncestor1l   r4   r:   )Ancestor)r8   r:   r   r   r   testj   s   zTestClass.testN)r/   r0   r1   r2   	Ancestor1r3   r9   r<   r   r   r   r   r+   Z   s
    
r+   c                   @   s   e Zd ZdZeZdS )Selfz9 Detect when using the same name inside the class scope. N)r/   r0   r1   r2   r>   objr   r   r   r   r>   p   s    r>   c                   @      e Zd ZdZdd ZdS )Self1z! No error should be raised here. c                 C   s   t S )z empty )rA   )r8   r   r   r   r<   w   r*   z
Self1.testN)r/   r0   r1   r2   r<   r   r   r   r   rA   t       rA   c                   @   r,   )r;    No op Nr.   r   r   r   r   r;   |   r4   r;   c                   @   r,   )r=   rC   Nr.   r   r   r   r   r=      r4   r=   c                   @   sX   e Zd ZdZdZefddZefddZefddZ	dZe
fd	d
ZdZefdd
ZdS )KeywordArgumentzTest keyword arguments.Tc                 C   r"   )zdo nothing.Nr   r8   
is_enabledr   r   r   r<      r$   zKeywordArgument.testc                 C   r"   )zEenabled is undefined at this point, but it is used before assignment.Nr   rE   r   r   r   r9      r$   zKeywordArgument.test1c                 C   r"   )zdisabled is undefinedNr   )r8   Zis_disabledr   r   r   test2   r$   zKeywordArgument.test2c                 C      | |  S r   r   r   r   r   r   r      r   zKeywordArgument.<lambda>r   c                 C   rH   r   r   )arg2r   r   r   r      r   N)r/   r0   r1   r2   enabler<   enabledr9   disabledrG   r   funcrI   r&   r   r   r   r   rD      s    rD   aNc                  C   s   g d} t dd | D }|S )N)rN   bZ_c_dc                 s   s    | ]
}| d sdV  qdS )_r   N)
startswith)r   methodr   r   r   r%      s    z1test_conditional_comprehension.<locals>.<genexpr>)sum)methodsZ
my_methodsr   r   r   test_conditional_comprehension   s   rV   c                   @      e Zd ZdS )MyErrorNr/   r0   r1   r   r   r   r   rX          rX   c                   @   s   e Zd ZG dd deZdS )MyClassc                   @   rW   )zMyClass.MyErrorNrY   r   r   r   r   rX      rZ   rX   N)r/   r0   r1   rX   r   r   r   r   r[      s    r[   c                    s    fdd}|S )Nc                    s   t   | S r   r   )rM   inpr   r   inner   s   zdec.<locals>.innerr   )r]   r^   r   r\   r   dec   s   r_   c                   @   r@   )LambdaClassr   c                   C      t jS r   )r`   myattrr   r   r   r   r          zLambdaClass.<lambda>N)r/   r0   r1   rb   mylambdar   r   r   r   r`      s    r`   c                   @   r@   )LambdaClass2r   c                   C   s   dd dD S )Nc                 S   s   g | ]}t jqS r   )re   rb   )r   rQ   r   r   r   r       s    z)LambdaClass2.<lambda>.<locals>.<listcomp>)r   r   r   r   r   r   r   r      s    zLambdaClass2.<lambda>N)r/   r0   r1   rb   Z	mylambda2r   r   r   r   re      rB   re   c                   @   r@   )LambdaClass3r   c                   C   s   t fddS )Nc                 S   r(   r   r   rN   r   r   r   r      r$   z'LambdaClass3.<lambda>.<locals>.<lambda>)rf   r   r   r   r   r          zLambdaClass3.<lambda>N)r/   r0   r1   rb   Z	mylambda3r   r   r   r   rf      s    rf   c                   @   s   e Zd ZdZefddZdS )LambdaClass4r   c                    r   )Nc                          S r   r   r   rg   r   r   r      r$   z'LambdaClass4.<lambda>.<locals>.<lambda>r   rg   r   rg   r   r      rh   zLambdaClass4.<lambda>N)r/   r0   r1   rb   ri   	mylambda4r   r   r   r   ri      s    ri   c                   @   s$   e Zd ZdZdd ZefddZdS )LambdaClass5r   c                   C   ra   r   )rl   rb   r   r   r   r   r      rc   zLambdaClass5.<lambda>c                    r   )Nc                      rj   r   r   r   rg   r   r   r      r$   z'LambdaClass5.<lambda>.<locals>.<lambda>r   rg   r   rg   r   r      rh   N)r/   r0   r1   rb   rd   rl   rk   r   r   r   r   rl      s    rl   c                     sB   dd l m}   fdd}d |  }|jd| | jdd d S )Nr   c                    s   | r d7  t   d S d S )Nr   r   )eventr   r   r   onclick   s   z"nonlocal_in_ifexp.<locals>.onclickZbutton_press_eventT)block)Zmatplotlib.pyplotZpyplotfigureZcanvasZmpl_connectshow)Zpltro   Zfigr   rn   r   nonlocal_in_ifexp   s   rs   )4
__future__r   ZDEFINEDunknownr   Z__revision__OTHERZunknown2r   ZdoesnotexistZLMBDZLMBD2ZPOUET	NameErrorZPOUETT	ExceptionZPOUETTTr	   ZPLOUF
ValueErrorr   r   ranger#   r&   r'   r+   r)   r;   r7   r>   rA   r=   ZBATZNANArD   Z	unicode_1Z	unicode_2Z	unicode_3Z	unicode_4IOErrorerrrV   rX   r[   r_   r`   re   rf   ri   rl   rs   r   r   r   r   <module>   s   




$ 