ó
'![c           @  s[  d  Z  d d l m Z d d l Z d d l Z d Z d Z d „  Z d „  Z d „  Z	 d	 e
 f d
 „  ƒ  YZ d e
 f d „  ƒ  YZ d e f d „  ƒ  YZ g  e D] Z e ^ qž Z d „  Z e j d d g ƒ Z e ƒ  Z e j d d g ƒ Z e ƒ  Z e a e a d „  Z d e
 f d „  ƒ  YZ d „  Z d „  Z d „  Z e Z d e f d „  ƒ  YZ  d S(   s"   Test for the invalid-name warning.iÿÿÿÿ(   t   print_functionNt    i    c          C  s   d }  t  |  ƒ d S(   s   Bad function name.i   N(   t   print(   t   BAD_LOCAL_VAR(    (    sA   lib/python2.7/site-packages/pylint/test/functional/name_styles.pyt   BADFUNCTION_name   s    c         C  s   |  S(   s%   Function with a badly named argument.(    (   t   NOT_GOOD(    (    sA   lib/python2.7/site-packages/pylint/test/functional/name_styles.pyt   func_bad_argname   s    c         C  s   t  |  | | ƒ d S(   s   Well-formed function.N(   R   (   t   arg1t   arg21t   arg22(    (    sA   lib/python2.7/site-packages/pylint/test/functional/name_styles.pyt   no_nested_args   s    t   bad_class_namec           B  s   e  Z d  Z RS(   s   Class with a bad name.(   t   __name__t
   __module__t   __doc__(    (    (    sA   lib/python2.7/site-packages/pylint/test/functional/name_styles.pyR      s   t   CorrectClassNamec           B  s>   e  Z d  Z d „  Z d Z d Z d „  Z d „  Z d „  Z RS(   s   Class with a good name.c         C  s1   d |  _  d |  _ d |  _ d  |  _ d  |  _ d  S(   Ni
   i   i   (   t   _good_private_namet)   _CorrectClassName__good_real_private_namet   good_attribute_namet   Nonet   _Bad_AtTR_namet   Bad_PUBLIC_name(   t   self(    (    sA   lib/python2.7/site-packages/pylint/test/functional/name_styles.pyt   __init__"   s
    				s   Why Was It Bad Class Attribute?s   Good Class Attributec         C  s   d S(   s   A Method with a bad name.N(    (   R   (    (    sA   lib/python2.7/site-packages/pylint/test/functional/name_styles.pyt   BadMethodName,   s    c         C  s   d S(   s   A method with a good name.N(    (   R   (    (    sA   lib/python2.7/site-packages/pylint/test/functional/name_styles.pyt   good_method_name/   s    c         C  s   d S(   s   Another badly named method.N(    (   R   (    (    sA   lib/python2.7/site-packages/pylint/test/functional/name_styles.pyt   __DunDER_IS_not_free_for_all__2   s    (	   R   R   R   R   t   zzt   GOOD_CLASS_ATTRR   R   R   (    (    (    sA   lib/python2.7/site-packages/pylint/test/functional/name_styles.pyR      s   			t   DerivedFromCorrectc           B  s&   e  Z d  Z d Z d „  Z d „  Z RS(   s‡   A derived class with an invalid inherited members.

    Derived attributes and methods with invalid names do not trigger warnings.
    s   Now a good class attributec         C  s    t  t |  ƒ j ƒ  d  |  _ d  S(   N(   t   superR   R   R   R   (   R   (    (    sA   lib/python2.7/site-packages/pylint/test/functional/name_styles.pyR   =   s    c         C  s   d S(   s-   Ignored since the method is in the interface.N(    (   R   (    (    sA   lib/python2.7/site-packages/pylint/test/functional/name_styles.pyR   A   s    (   R   R   R   R   R   R   (    (    (    sA   lib/python2.7/site-packages/pylint/test/functional/name_styles.pyR   6   s   	c          C  s   d t  f d „  ƒ  Y}  |  S(   s"   Function returning a class object.t   EmbeddedClassc           B  s   e  Z d  Z RS(   s   Useless class.(   R   R   R   (    (    (    sA   lib/python2.7/site-packages/pylint/test/functional/name_styles.pyR   J   s   (   t   object(   R   (    (    sA   lib/python2.7/site-packages/pylint/test/functional/name_styles.pyt   class_builderG   s    t   Namedt   tuplec           C  s   d a  d a d S(   s,   Names in global statements are also checked.i   i   N(   t   NOT_CORRECTt   AlsoCorrect(    (    (    sA   lib/python2.7/site-packages/pylint/test/functional/name_styles.pyt   test_globals[   s    t   FooClassc           B  sJ   e  Z d  Z e d „  ƒ Z e j d „  ƒ Z e j d „  ƒ Z	 d „  Z
 RS(   sÆ   A test case for property names.

    Since by default, the regex for attributes is the same as the one
    for method names, we check the warning messages to contain the
    string 'attribute'.
    c         C  s   d S(   s   Ignored.N(    (   R   (    (    sA   lib/python2.7/site-packages/pylint/test/functional/name_styles.pyt   PROPERTY_NAMEj   s    c         C  s   d S(   s   Ignored.N(    (   R   (    (    sA   lib/python2.7/site-packages/pylint/test/functional/name_styles.pyt   ABSTRACT_PROPERTY_NAMEo   s    c         C  s   d S(   s   Ignored.N(    (   R   (    (    sA   lib/python2.7/site-packages/pylint/test/functional/name_styles.pyt   PROPERTY_NAME_SETTERt   s    c         C  s   d S(   s   private method with long nameN(    (   R   (    (    sA   lib/python2.7/site-packages/pylint/test/functional/name_styles.pyt.   _nice_and_long_descriptive_private_method_namey   s    (   R   R   R   t   propertyR(   t   abct   abstractpropertyR)   t   setterR*   R+   (    (    (    sA   lib/python2.7/site-packages/pylint/test/functional/name_styles.pyR'   c   s
   c         C  s   d } | |  S(   s!   This is a perfect public functioni   (    (   t   good_arg_namet   good_variable_name(    (    sA   lib/python2.7/site-packages/pylint/test/functional/name_styles.pyt   good_public_function_name~   s    c           C  s   d S(   s*   Public scope function with a too long namei   (    (    (    (    sA   lib/python2.7/site-packages/pylint/test/functional/name_styles.pyt&   too_long_function_name_in_public_scope„   s    c           C  s   d S(   s;   Private scope function are cool with long descriptive namesi   (    (    (    (    sA   lib/python2.7/site-packages/pylint/test/functional/name_styles.pyt2   _private_scope_function_with_long_descriptive_nameˆ   s    t/   _AnExceptionalExceptionThatOccursVeryVeryRarelyc           B  s   e  Z d  Z RS(   s9   A very exceptional exception with a nice descriptive name(   R   R   R   (    (    (    sA   lib/python2.7/site-packages/pylint/test/functional/name_styles.pyR5   Ž   s   (!   R   t
   __future__R    R-   t   collectionst   GOOD_CONST_NAMEt   bad_const_nameR   R   R
   R    R   R   R   t   WHAT_Ever_inListCompt   VR!   t
   namedtuplet   BAD_NAME_FOR_CLASSt   NEXT_BAD_NAME_FOR_CLASSt   GoodNamet   ToplevelClassR%   R$   R&   R'   R2   R3   R4   t   Truet+   LONG_CONSTANT_NAME_IN_PUBLIC_SCOPE_ARE_OKAYt	   ExceptionR5   (    (    (    sA   lib/python2.7/site-packages/pylint/test/functional/name_styles.pyt   <module>   s4   											