ó
'![c           @  s&  d  d l  m Z d Z e d k rD e e e f k rD e d 7Z qD n  d „  Z i e e 6Z d e e <Z e d 7Z e d „ Z e	 d „ Z
 d „  Z y e Wn e k
 r´ d	 Z n Xy e Wn e k
 rÖ d	 Z n Xy e Wn d	 Z n Xe e e e ƒ y e Wn e k
 r d	 Z n Xe e ƒ d
 „  Z d „  Z e d g  e d ƒ D] Z e d ^ qPƒ d „  ƒ Z e d d „  e d ƒ Dƒ ƒ d „  ƒ Z e d „  ƒ d „  ƒ Z e d „ Z d e f d „  ƒ  YZ d e f d „  ƒ  YZ d e f d „  ƒ  YZ  d e f d „  ƒ  YZ d e f d „  ƒ  YZ! e" Z# [" d e f d  „  ƒ  YZ$ y e% Wn e k
 rfn Xy e& Wn e k
 r‚n Xy e' Wn n Xy e( Wn e k
 r°n Xy e) d d! ƒ ‚ Wn e) k
 rãZ* e e* ƒ n Xd" „  Z+ d# e f d$ „  ƒ  YZ, d% e f d& „  ƒ  YZ- d' „  Z. d( S()   iÿÿÿÿ(   t   print_functioni   c         C  s   t  }  |  s t ‚ d S(   s
   method docN(   t   nomoreknownt   AssertionError(   t   var(    (    sH   lib/python2.7/site-packages/pylint/test/functional/undefined_variable.pyt	   in_method   s    s   move this is astroid testt   $c         C  s(   t  |  | ƒ t  t ƒ | d 7} ~ d S(   s:   function with defaut arg's value set to an unexistant namei   N(   t   printt   xxxx(   R   t   defaultt   augvart   vardel(    (    sH   lib/python2.7/site-packages/pylint/test/functional/undefined_variable.pyt   bad_default   s    

c         C  s   |  | S(   N(    (   t   xt   y(    (    sH   lib/python2.7/site-packages/pylint/test/functional/undefined_variable.pyt   <lambda>   s    c         C  s   |  t  S(   N(   t   z(   R   R   (    (    sH   lib/python2.7/site-packages/pylint/test/functional/undefined_variable.pyR      s    t	   somethingc         C  s2   |  d k r | d k r. q. n t  | ƒ d } d S(   t   hopi    i   i   N(   R   (   R   t   xxx(    (    sH   lib/python2.7/site-packages/pylint/test/functional/undefined_variable.pyt   if_branch_test9   s
    
c           s   ‡  f d †  S(   s   Decorator with one argument.c             s
   t  ˆ  ƒ S(   N(   t   list(    (   t   arg(    sH   lib/python2.7/site-packages/pylint/test/functional/undefined_variable.pyR   E   s    (    (   R   (    (   R   sH   lib/python2.7/site-packages/pylint/test/functional/undefined_variable.pyt	   decoratorC   s    R   i   i   c           C  s   d S(   s5   A function with a decorator that contains a listcomp.N(    (    (    (    sH   lib/python2.7/site-packages/pylint/test/functional/undefined_variable.pyt   func1H   s    c         c  s   |  ] } | d  Vq d S(   i   N(    (   t   .0t   i(    (    sH   lib/python2.7/site-packages/pylint/test/functional/undefined_variable.pys	   <genexpr>L   s    c           C  s   d S(   s4   A function with a decorator that contains a genexpr.N(    (    (    (    sH   lib/python2.7/site-packages/pylint/test/functional/undefined_variable.pyt   func2L   s    c         C  s
   |  d k S(   Ni    (    (   R   (    (    sH   lib/python2.7/site-packages/pylint/test/functional/undefined_variable.pyR   P   s    c           C  s   d S(   s3   A function with a decorator that contains a lambda.N(    (    (    (    sH   lib/python2.7/site-packages/pylint/test/functional/undefined_variable.pyt   mainP   s    c         C  s   |  S(   s    TestClass isn't defined yet. (    (   R   (    (    sH   lib/python2.7/site-packages/pylint/test/functional/undefined_variable.pyt   test_argumentsV   s    t	   TestClassc           B  s6   e  Z d  Z d e f d „  ƒ  YZ d „  Z d „  Z RS(   s;    contains another class, which uses an undefined ancestor. t   MissingAncestorc           B  s   e  Z d  Z RS(   s    no op (   t   __name__t
   __module__t   __doc__(    (    (    sH   lib/python2.7/site-packages/pylint/test/functional/undefined_variable.pyR   ]   s   c         C  s0   d | f d „  ƒ  Y} d t  f d „  ƒ  Y} | S(   sV    It should trigger here, because the two classes
        have the same scope.
        t   UsingBeforeDefinitionc           B  s   e  Z d  Z RS(   s    uses Empty before definition (   R   R    R!   (    (    (    sH   lib/python2.7/site-packages/pylint/test/functional/undefined_variable.pyR"   d   s   t   Emptyc           B  s   e  Z d  Z RS(   s    no op (   R   R    R!   (    (    (    sH   lib/python2.7/site-packages/pylint/test/functional/undefined_variable.pyR#   f   s   (   t   object(   t   selfR#   R"   (    (    sH   lib/python2.7/site-packages/pylint/test/functional/undefined_variable.pyt   test1`   s    c         C  s   d t  f d „  ƒ  Y} | S(   s0    Ancestor isn't defined yet, but we don't care. t   MissingAncestor1c           B  s   e  Z d  Z RS(   s    no op (   R   R    R!   (    (    (    sH   lib/python2.7/site-packages/pylint/test/functional/undefined_variable.pyR'   l   s   (   t   Ancestor(   R%   R'   (    (    sH   lib/python2.7/site-packages/pylint/test/functional/undefined_variable.pyt   testj   s    (   R   R    R!   t	   Ancestor1R   R&   R)   (    (    (    sH   lib/python2.7/site-packages/pylint/test/functional/undefined_variable.pyR   Z   s   	
t   Selfc           B  s   e  Z d  Z e Z RS(   s9    Detect when using the same name inside the class scope. (   R   R    R!   R+   t   obj(    (    (    sH   lib/python2.7/site-packages/pylint/test/functional/undefined_variable.pyR+   p   s   t   Self1c           B  s   e  Z d  Z d „  Z RS(   s!    No error should be raised here. c         C  s   t  S(   s    empty (   R-   (   R%   (    (    sH   lib/python2.7/site-packages/pylint/test/functional/undefined_variable.pyR)   w   s    (   R   R    R!   R)   (    (    (    sH   lib/python2.7/site-packages/pylint/test/functional/undefined_variable.pyR-   t   s   R(   c           B  s   e  Z d  Z RS(   s    No op (   R   R    R!   (    (    (    sH   lib/python2.7/site-packages/pylint/test/functional/undefined_variable.pyR(   |   s   R*   c           B  s   e  Z d  Z RS(   s    No op (   R   R    R!   (    (    (    sH   lib/python2.7/site-packages/pylint/test/functional/undefined_variable.pyR*      s   t   KeywordArgumentc           B  s\   e  Z d  Z e Z e d „ Z e d „ Z e d „ Z	 e Z e
 d „ Z d Z e d „ Z RS(   s   Test keyword arguments.c         C  s   d S(   s   do nothing.N(    (   R%   t
   is_enabled(    (    sH   lib/python2.7/site-packages/pylint/test/functional/undefined_variable.pyR)   Š   s    c         C  s   d S(   sE   enabled is undefined at this point, but it is used before assignment.N(    (   R%   R/   (    (    sH   lib/python2.7/site-packages/pylint/test/functional/undefined_variable.pyR&      s    c         C  s   d S(   s   disabled is undefinedN(    (   R%   t   is_disabled(    (    sH   lib/python2.7/site-packages/pylint/test/functional/undefined_variable.pyt   test2   s    c         C  s   |  |  S(   N(    (   R   (    (    sH   lib/python2.7/site-packages/pylint/test/functional/undefined_variable.pyR   •   s    i    c         C  s   |  |  S(   N(    (   t   arg2(    (    sH   lib/python2.7/site-packages/pylint/test/functional/undefined_variable.pyR   ˜   s    (   R   R    R!   t   Truet   enableR)   t   enabledR&   t   disabledR1   R   t   funcR2   R   (    (    (    sH   lib/python2.7/site-packages/pylint/test/functional/undefined_variable.pyR.   †   s   t   ac          C  s,   d d d d g }  t  d „  |  Dƒ ƒ } | S(   NR8   t   bt   _ct   _dc         s  s$   |  ] } | j  d  ƒ s d Vq d S(   t   _i   N(   t
   startswith(   R   t   method(    (    sH   lib/python2.7/site-packages/pylint/test/functional/undefined_variable.pys	   <genexpr>¶   s    (   t   sum(   t   methodst
   my_methods(    (    sH   lib/python2.7/site-packages/pylint/test/functional/undefined_variable.pyt   test_conditional_comprehension´   s    t   MyErrorc           B  s   e  Z RS(    (   R   R    (    (    (    sH   lib/python2.7/site-packages/pylint/test/functional/undefined_variable.pyRC   »   s   t   MyClassc           B  s   e  Z d  e f d „  ƒ  YZ RS(   RC   c           B  s   e  Z RS(    (   R   R    (    (    (    sH   lib/python2.7/site-packages/pylint/test/functional/undefined_variable.pyRC   À   s   (   R   R    RC   (    (    (    sH   lib/python2.7/site-packages/pylint/test/functional/undefined_variable.pyRD   ¿   s   c           s   ‡  f d †  } | S(   Nc           s   t  ˆ  ƒ |  S(   N(   R   (   R7   (   t   inp(    sH   lib/python2.7/site-packages/pylint/test/functional/undefined_variable.pyt   innerÅ   s    
(    (   RE   RF   (    (   RE   sH   lib/python2.7/site-packages/pylint/test/functional/undefined_variable.pyt   decÄ   s    N(/   t
   __future__R    t   DEFINEDt   unknownR   t   __revision__t   OTHERt   unknown2R   t   doesnotexistt   LMBDt   LMBD2t   POUETt	   NameErrort   POUETTt	   Exceptiont   POUETTTR   t   PLOUFt
   ValueErrorR   R   t   rangeR   R   R   R   R   R   R(   R$   R+   R-   R*   t   BATt   NANAR.   t	   unicode_1t	   unicode_2t	   unicode_3t	   unicode_4t   IOErrort   errRB   RC   RD   RG   (    (    (    sH   lib/python2.7/site-packages/pylint/test/functional/undefined_variable.pyt   <module>   s†   	
	




	
	5(  	