
]c        :   @@ sN  d  d l  m Z m Z d  d l Z d  d l m Z m Z d  d l Z d  d l Z d  d l Z	 d  d l
 Z
 d  d l Z d  d l Z y d  d l j Z Wn e k
 r d  d l Z n Xd d d d d d	 d
 d d d d d d d d d d d d d d d d d d d d d d  d! d" d# d$ d% d& d' d( d) d* d+ d, d- d. d/ d0 d1 d2 d3 d4 d5 d6 d7 d8 d9 d: d; d< d= g: Z d>   Z d?   Z d@ e f dA     YZ dB e f dC     YZ dD e f dE     YZ dF e f dG     YZ dH e f dI     YZ dJ   Z dK   Z dL   Z dM   Z dN   Z dO e f dP     YZ dQ e f dR     YZ  e  dS e!  Z" dT e f dU     YZ# dV e f dW     YZ$ e$ dS e!  Z% dX   Z& dY e f dZ     YZ' d[ e f d\     YZ( e( dS e!  Z) d] e f d^     YZ* d_ e f d`     YZ+ e+ dS e!  Z, da e f db     YZ- dc e f dd     YZ. e. dS e!  Z/ de e f df     YZ0 dg e f dh     YZ1 e1 di  Z2 e1 dj  Z3 e1 dk  Z4 e1 dl dm e! Z5 e1 dn dm e! Z6 e1 do dm e! Z7 e1 dp dq e! Z8 e1 d2 e9 e:  Z; dr   Z< e= e= ds  Z> dt   Z? du   Z@ g  ZA dv   ZB dw e f dx     YZC dy e f dz     YZD eD dS e!  ZE d{ e f d|     YZF d} e f d~     YZG eG dS e!  ZH d   ZI d   ZJ d e e jK f d     YZL d   ZM eM e jN eL <e= ZO d   ZP d e f d     YZO d e f d     YZQ d e f d     YZR d eL f d     YZS eM e jN eS <d eT f d     YZU d eL f d     YZV eM e jN eV <d e f d     YZW d   ZX d   ZY e= e= d  ZZ d   Z[ d   Z\ d   Z] d   Z^ d d d d d  d d d" d g	 Z_ d eL f d     YZ` d e f d     YZa d   Zb e jc Zc d eO e5 f d     YZd d ed e5 f d     YZe eb d ea f d     Y Zf eb d ea f d     Y Zg eb d ea f d     Y Zh eb d ea f d     Y Zi eb d ea e5 f d     Y Zj ek e d"  r8d ed e5 f d     YZl n  eb d ea e5 f d     Y Zl e jm Zm d eO e5 f d     YZn d em ed e5 en e5 f d     YZo d eo e2 f d     YZp d em ed e3 en e3 eO e3 e7 f f d     YZq d eq e3 e4 f f d     YZr ek e d"  r@d em el e5 en e5 f d     YZs n$ d em ed e5 en e5 f d     YZs d es e2 f d     YZt d es eu f d     YZv ev jw ex  ev jw ey  d ez et e2 f d     YZ{ d e j| et e2 f d     YZ} d e~ ep e2 f d     YZ d e eo e5 f d     YZ d em ed e5 f d     YZ d e e3 eo e3 f d     YZ d e eU e3 e7 f eo eU e3 e7 f eO e3 e7 f f d     YZ d e e7 f d     YZ d eO e5 f d     YZ d e er e3 e4 f f d     YZ d e j er e3 e4 f f d     YZ d e j e e2 eu f f d     YZ ek e d1  rg
e j Z n	 e j Z d ee e5 eO e5 e8 e6 f f d     YZ e1 d dm e! d e Z d eO e f d     YZ d   Z d   Z d   Z e= d  Z d e f d     YZ e d e f i   Z e e _ d e _ d   Z e: Z e Z d eO e; f d     YZ d e e9 f d     YZ d e e: f d     YZ d e f d     YZ e d e _ e e
 j e j <e d e; e e	 j d   d    Z e d e; e e	 j d d   d    Z d e f d     YZ e d e _ e e
 j e j <d S(   i    (   t   absolute_importt   unicode_literalsN(   t   abstractmethodt   abstractpropertyu   Anyu   Callableu   ClassVaru   Finalu   Genericu   Literalu   Optionalu   Protocolu   Tupleu   Typeu   TypeVaru   Unionu   AbstractSetu   GenericMetau
   ByteStringu	   Containeru   ContextManageru   Hashableu	   ItemsViewu   Iterableu   Iteratoru   KeysViewu   Mappingu   MappingViewu   MutableMappingu   MutableSequenceu
   MutableSetu   Sequenceu   Sizedu
   ValuesViewu
   Reversibleu   SupportsAbsu   SupportsComplexu   SupportsFloatu   SupportsIndexu   SupportsIntu   Counteru   Dequeu   Dictu   DefaultDictu   Listu   Setu	   FrozenSetu
   NamedTupleu	   TypedDictu	   Generatoru   AnyStru   castu   finalu   get_type_hintsu   NewTypeu   no_type_checku   no_type_check_decoratoru   NoReturnu   overloadu   runtime_checkableu   Textu   TYPE_CHECKINGc         C@ s%   t  j d  d k r |  j S|  j Sd  S(   Ni   i   (   i   i   (   t   syst   version_infot   __qualname__t   __name__(   t   x(    (    s%   lib/python2.7/site-packages/typing.pyt	   _qualname^   s    c         C@ s2   d } |  j  d  r. |  | k r. |  d }  n  |  S(   Nu
   _TypeAliasu   _ForwardRefu   _TypingBaseu   _FinalTypingBaseu   _i   (   u
   _TypeAliasu   _ForwardRefu   _TypingBaseu   _FinalTypingBase(   t
   startswith(   t   nmt	   whitelist(    (    s%   lib/python2.7/site-packages/typing.pyt
   _trim_namef   s    t
   TypingMetac           B@ sP   e  Z d  Z e Z d   Z e d    Z d   Z d   Z	 d   Z
 d   Z RS(   u   Metaclass for most types defined in typing module
    (not a part of public API).

    This also defines a dummy constructor (all the work for most typing
    constructs is done in __new__) and a nicer repr().
    c         C@ s%   t  t |   j |  t |  | |  S(   N(   t   superR   t   __new__t   str(   t   clst   namet   basest	   namespace(    (    s%   lib/python2.7/site-packages/typing.pyR   w   s    c         C@ sO   xH | D]@ } t  | |   r t d d j t t |   p= d   q q Wd  S(   Nu   Cannot subclass %su   , u   ()(   t
   isinstancet	   TypeErrort   joint   mapt
   _type_repr(   R   R   t   base(    (    s%   lib/python2.7/site-packages/typing.pyt   assert_no_subclassingz   s    c         O@ s   d  S(   N(    (   t   selft   argst   kwds(    (    s%   lib/python2.7/site-packages/typing.pyt   __init__   s    c         C@ s   |  S(   u'  Override this in subclasses to interpret forward references.

        For example, List['C'] is internally stored as
        List[_ForwardRef('C')], which should evaluate to List[C],
        where C is an object found in globalns or localns (searching
        localns first, of course).
        (    (   R   t   globalnst   localns(    (    s%   lib/python2.7/site-packages/typing.pyt
   _eval_type   s    c         C@ s   d  S(   N(    (   R   t   tvars(    (    s%   lib/python2.7/site-packages/typing.pyt   _get_type_vars   s    c         C@ s#   t  t |    } d |  j | f S(   Nu   %s.%s(   R   R	   t
   __module__(   R   t   qname(    (    s%   lib/python2.7/site-packages/typing.pyt   __repr__   s    (   R   R&   t   __doc__t   Falset   _is_protocolR   t   classmethodR   R    R#   R%   R(   (    (    (    s%   lib/python2.7/site-packages/typing.pyR   m   s   			
	t   _TypingBasec           B@ sP   e  Z d  Z e Z d Z d   Z d   Z d   Z d   Z	 d   Z
 d   Z RS(	   u0   Internal indicator of special typing constructs.u   __weakref__c         O@ s   d  S(   N(    (   R   R   R   (    (    s%   lib/python2.7/site-packages/typing.pyR       s    c         O@ sa   t  |  d k rK t | d t  rK t | d t  rK t d |    n  t t |   j |   S(   u   Constructor.

        This only exists to give a better error message in case
        someone tries to subclass a special typing object (not a good idea).
        i   i    i   u   Cannot subclass %r(   t   lenR   R   t   tupleR   R   R-   R   (   R   R   R   (    (    s%   lib/python2.7/site-packages/typing.pyR      s
    c         C@ s   |  S(   N(    (   R   R!   R"   (    (    s%   lib/python2.7/site-packages/typing.pyR#      s    c         C@ s   d  S(   N(    (   R   R$   (    (    s%   lib/python2.7/site-packages/typing.pyR%      s    c         C@ s/   t  |   } t t |   } d | j | f S(   Nu   %s.%s(   t   typeR   R	   R&   (   R   R   R'   (    (    s%   lib/python2.7/site-packages/typing.pyR(      s    c         O@ s   t  d t |     d  S(   Nu   Cannot instantiate %r(   R   R0   (   R   R   R   (    (    s%   lib/python2.7/site-packages/typing.pyt   __call__   s    (   u   __weakref__(   R   R&   R)   R   t   __metaclass__t	   __slots__R    R   R#   R%   R(   R1   (    (    (    s%   lib/python2.7/site-packages/typing.pyR-      s   					t   _FinalTypingBasec           B@ s&   e  Z d  Z d Z d   Z d   Z RS(   u   Internal mix-in class to prevent instantiation.

    Prevents instantiation unless _root=True is given in class call.
    It is used to create pseudo-singleton instances Any, Union, Optional, etc.
    c         O@ sR   t  t |   j |  | |  } d | k r> | d t k r> | St d |    d  S(   Nu   _rootu   Cannot instantiate %r(   R   R4   R   t   TrueR   (   R   R   R   R   (    (    s%   lib/python2.7/site-packages/typing.pyR      s    c         C@ s   t  t |   j  S(   N(   R   R0   R   (   R   (    (    s%   lib/python2.7/site-packages/typing.pyt
   __reduce__   s    (    (   R   R&   R)   R3   R   R6   (    (    (    s%   lib/python2.7/site-packages/typing.pyR4      s   	t   _ForwardRefc           B@ sS   e  Z d  Z d Z d   Z d   Z d   Z d   Z d	   Z d
   Z	 d   Z
 RS(   u-   Internal wrapper to hold a forward reference.u   __forward_arg__u   __forward_code__u   __forward_evaluated__u   __forward_value__c         C@ s   t  t |   j |  t | t  s; t d | f   n  y t | d d  } Wn$ t k
 rw t d | f   n X| |  _ | |  _	 t
 |  _ d  |  _ d  S(   Nu,   Forward reference must be a string -- got %ru   <string>u   evalu1   Forward reference must be an expression -- got %r(   R   R7   R    R   t
   basestringR   t   compilet   SyntaxErrort   __forward_arg__t   __forward_code__R*   t   __forward_evaluated__t   Nonet   __forward_value__(   R   t   argt   code(    (    s%   lib/python2.7/site-packages/typing.pyR       s    			c         C@ s   |  j  s | | k	 r | d  k r; | d  k r; i  } } n* | d  k rP | } n | d  k re | } n  t t |  j | |  d  |  _ t |  _  n  |  j S(   Nu*   Forward references must evaluate to types.(   R=   R>   t   _type_checkt   evalR<   R?   R5   (   R   R!   R"   (    (    s%   lib/python2.7/site-packages/typing.pyR#      s    		c         C@ s5   t  | t  s t S|  j | j k o4 |  j | j k S(   N(   R   R7   t   NotImplementedR;   R?   (   R   t   other(    (    s%   lib/python2.7/site-packages/typing.pyt   __eq__   s    c         C@ s   t  |  j |  j f  S(   N(   t   hashR;   R?   (   R   (    (    s%   lib/python2.7/site-packages/typing.pyt   __hash__   s    c         C@ s   t  d   d  S(   Nu4   Forward references cannot be used with isinstance().(   R   (   R   t   obj(    (    s%   lib/python2.7/site-packages/typing.pyt   __instancecheck__   s    c         C@ s   t  d   d  S(   Nu4   Forward references cannot be used with issubclass().(   R   (   R   R   (    (    s%   lib/python2.7/site-packages/typing.pyt   __subclasscheck__   s    c         C@ s   d |  j  f S(   Nu   _ForwardRef(%r)(   R;   (   R   (    (    s%   lib/python2.7/site-packages/typing.pyR(      s    (   u   __forward_arg__u   __forward_code__u   __forward_evaluated__u   __forward_value__(   R   R&   R)   R3   R    R#   RF   RH   RJ   RK   R(   (    (    (    s%   lib/python2.7/site-packages/typing.pyR7      s    						t
   _TypeAliasc           B@ sS   e  Z d  Z d Z d   Z d   Z d   Z d   Z d	   Z d
   Z	 d   Z
 RS(   u:  Internal helper class for defining generic variants of concrete types.

    Note that this is not a type; let's call it a pseudo-type.  It cannot
    be used in instance and subclass checks in parameterized form, i.e.
    ``isinstance(42, Match[str])`` raises ``TypeError`` instead of returning
    ``False``.
    u   nameu   type_varu	   impl_typeu   type_checkerc         C@ s   t  | t  s! t t |    t  | t  sB t t |    t  | t  sd t t |    t  | t t f  s t t |    | |  _ | |  _ | |  _	 | |  _
 d S(   ut  Initializer.

        Args:
            name: The name, e.g. 'Pattern'.
            type_var: The type parameter, e.g. AnyStr, or the
                specific type, e.g. str.
            impl_type: The implementation type.
            type_checker: Function that takes an impl_type instance.
                and returns a value that should be a type_var instance.
        N(   R   R8   t   AssertionErrort   reprR0   R   R-   R   t   type_vart	   impl_typet   type_checker(   R   R   RO   RP   RQ   (    (    s%   lib/python2.7/site-packages/typing.pyR      s    !!"'			c         C@ s   d |  j  t |  j  f S(   Nu   %s[%s](   R   R   RO   (   R   (    (    s%   lib/python2.7/site-packages/typing.pyR(   "  s    c         C@ s   t  |  j t  s% t d |    n  |  j j rt t  | t  rt t | |  j j  st t d | |  j f   qt n  t  | t  r | |  j k	 r t d |    n  |  j |  j | |  j	 |  j
  S(   Nu#   %s cannot be further parameterized.u&   %s is not a valid substitution for %s.u   %s cannot be re-parameterized.(   R   RO   t   TypeVarR   t   __constraints__R0   t
   issubclasst	   __class__R   RP   RQ   (   R   t	   parameter(    (    s%   lib/python2.7/site-packages/typing.pyt   __getitem__%  s    c         C@ s5   t  | t  s t S|  j | j k o4 |  j | j k S(   N(   R   RL   RD   R   RO   (   R   RE   (    (    s%   lib/python2.7/site-packages/typing.pyRF   1  s    c         C@ s   t  |  j |  j f  S(   N(   RG   R   RO   (   R   (    (    s%   lib/python2.7/site-packages/typing.pyRH   6  s    c         C@ s1   t  |  j t  s! t d   n  t  | |  j  S(   Nu<   Parameterized type aliases cannot be used with isinstance().(   R   RO   RR   R   RP   (   R   RI   (    (    s%   lib/python2.7/site-packages/typing.pyRJ   9  s    c         C@ s1   t  |  j t  s! t d   n  t | |  j  S(   Nu<   Parameterized type aliases cannot be used with issubclass().(   R   RO   RR   R   RT   RP   (   R   R   (    (    s%   lib/python2.7/site-packages/typing.pyRK   ?  s    (   u   nameu   type_varu	   impl_typeu   type_checker(   R   R&   R)   R3   R    R(   RW   RF   RH   RJ   RK   (    (    (    s%   lib/python2.7/site-packages/typing.pyRL     s   						c         C@ sC   x< |  D]4 } t  | t  s+ t  | t  r | j |  q q Wd  S(   N(   R   R   R-   R%   (   t   typesR$   t   t(    (    s%   lib/python2.7/site-packages/typing.pyR%   F  s    c         C@ s   g  } t  |  |  t |  S(   N(   R%   R/   (   RX   R$   (    (    s%   lib/python2.7/site-packages/typing.pyt
   _type_varsL  s    c         C@ s2   t  |  t  s t  |  t  r. |  j | |  S|  S(   N(   R   R   R-   R#   (   RY   R!   R"   (    (    s%   lib/python2.7/site-packages/typing.pyR#   R  s    c         C@ s   |  d k r t d  St |  t  r4 t |   }  n  t |  t  rX t |   j d k s{ t |  t t f  r t |   r t | d |  f   n  t |   j d k r t	 |  d d  s t |  t
  r |  j t t f k r t d |    n  |  S(	   u  Check that the argument is a type, and return it (internal helper).

    As a special case, accept None and return type(None) instead.
    Also, _TypeAlias instances (e.g. Match, Pattern) are acceptable.

    The msg argument is a human-readable error message, e.g.

        "Union[arg, ...]: arg should be a type."

    We append the repr() of the actual value (truncated to 100 chars).
    u	   _ClassVaru    Got %.100r.u   _Unionu	   _Optionalu
   __origin__u&   Plain %s is not valid as type argumentN(   u   _Unionu	   _Optional(   R>   R0   R   R8   R7   R-   R   t   callableR   t   getattrR   t   _gorgt   Generict   Protocol(   R@   t   msg(    (    s%   lib/python2.7/site-packages/typing.pyRB   X  s    
$#$c         C@ s   t  |  t  rO t  |  t  rO |  j d k r8 t |   Sd |  j t |   f S|  t k r_ d St  |  t j  rx |  j St	 |   S(   u;  Return the repr() of an object, special-casing types (internal helper).

    If obj is a type, we return a shorter version than the default
    type.__repr__, based on the module and qualified name, which is
    typically enough to uniquely identify a type.  For everything
    else, we fall back on repr(obj).
    u   __builtin__u   %s.%su   ...(
   R   R0   R   R&   R	   t   EllipsisRX   t   FunctionTypeR   RN   (   RI   (    (    s%   lib/python2.7/site-packages/typing.pyR   w  s    
t   ClassVarMetac           B@ s   e  Z d  Z d   Z RS(   u   Metaclass for _ClassVarc         C@ s2   |  j  |  t t |   j |  | | |  } | S(   N(   R   R   Rc   R   (   R   R   R   R   R   (    (    s%   lib/python2.7/site-packages/typing.pyR     s    !(   R   R&   R)   R   (    (    (    s%   lib/python2.7/site-packages/typing.pyRc     s   t	   _ClassVarc           B@ sV   e  Z d  Z e Z d Z d	 e d  Z d   Z	 d   Z
 d   Z d   Z d   Z RS(
   uC  Special type construct to mark class variables.

    An annotation wrapped in ClassVar indicates that a given
    attribute is intended to be used as a class variable and
    should not be set on instances of that class. Usage::

      class Starship:
          stats = {}  # type: ClassVar[Dict[str, int]] # class variable
          damage = 10 # type: int                      # instance variable

    ClassVar accepts only types and cannot be further subscribed.

    Note that ClassVar is not a class itself, and should not
    be used with isinstance() or issubclass().
    u   __type__c         C@ s   | |  _  d  S(   N(   t   __type__(   R   t   tpt   _root(    (    s%   lib/python2.7/site-packages/typing.pyR      s    c         C@ sd   t  |   } |  j d  k rD | t | d j | j d   d t St d j | j d    d  S(   Nu   {} accepts only types.i   Rg   u    {} cannot be further subscripted(   R0   Re   R>   RB   t   formatR   R5   R   (   R   t   itemR   (    (    s%   lib/python2.7/site-packages/typing.pyRW     s    		c         C@ s%   t  |   t |  j | |  d t S(   NRg   (   R0   R#   Re   R5   (   R   R!   R"   (    (    s%   lib/python2.7/site-packages/typing.pyR#     s    c         C@ sG   t  t |   j   } |  j d  k	 rC | d j t |  j   7} n  | S(   Nu   [{}](   R   Rd   R(   Re   R>   Rh   R   (   R   t   r(    (    s%   lib/python2.7/site-packages/typing.pyR(     s    c         C@ s   t  t |   j |  j f  S(   N(   RG   R0   R   Re   (   R   (    (    s%   lib/python2.7/site-packages/typing.pyRH     s    c         C@ s<   t  | t  s t S|  j d  k	 r2 |  j | j k S|  | k S(   N(   R   Rd   RD   Re   R>   (   R   RE   (    (    s%   lib/python2.7/site-packages/typing.pyRF     s
    (   u   __type__N(   R   R&   R)   Rc   R2   R3   R>   R*   R    RW   R#   R(   RH   RF   (    (    (    s%   lib/python2.7/site-packages/typing.pyRd     s   					Rg   t
   _FinalMetac           B@ s   e  Z d  Z d   Z RS(   u   Metaclass for _Finalc         C@ s2   |  j  |  t t |   j |  | | |  } | S(   N(   R   R   Rk   R   (   R   R   R   R   R   (    (    s%   lib/python2.7/site-packages/typing.pyR     s    !(   R   R&   R)   R   (    (    (    s%   lib/python2.7/site-packages/typing.pyRk     s   t   _Finalc           B@ sS   e  Z d  Z e Z d Z d	 d  Z d   Z d   Z	 d   Z
 d   Z d   Z RS(
   u  A special typing construct to indicate that a name
    cannot be re-assigned or overridden in a subclass.
    For example:

        MAX_SIZE: Final = 9000
        MAX_SIZE += 1  # Error reported by type checker

        class Connection:
            TIMEOUT: Final[int] = 10
        class FastConnector(Connection):
            TIMEOUT = 1  # Error reported by type checker

    There is no runtime checking of these properties.
    u   __type__c         K@ s   | |  _  d  S(   N(   Re   (   R   Rf   R   (    (    s%   lib/python2.7/site-packages/typing.pyR      s    c         C@ sd   t  |   } |  j d  k rD | t | d j | j d   d t St d j | j d    d  S(   Nu   {} accepts only single type.i   Rg   u    {} cannot be further subscripted(   R0   Re   R>   RB   Rh   R   R5   R   (   R   Ri   R   (    (    s%   lib/python2.7/site-packages/typing.pyRW     s    		c         C@ s>   t  |  j | |  } | |  j k r( |  St |   | d t S(   NRg   (   R#   Re   R0   R5   (   R   R!   R"   t   new_tp(    (    s%   lib/python2.7/site-packages/typing.pyR#     s    c         C@ sG   t  t |   j   } |  j d  k	 rC | d j t |  j   7} n  | S(   Nu   [{}](   R   Rl   R(   Re   R>   Rh   R   (   R   Rj   (    (    s%   lib/python2.7/site-packages/typing.pyR(     s    c         C@ s   t  t |   j |  j f  S(   N(   RG   R0   R   Re   (   R   (    (    s%   lib/python2.7/site-packages/typing.pyRH     s    c         C@ s<   t  | t  s t S|  j d  k	 r2 |  j | j k S|  | k S(   N(   R   Rl   RD   Re   R>   (   R   RE   (    (    s%   lib/python2.7/site-packages/typing.pyRF     s
    (   u   __type__N(   R   R&   R)   Rk   R2   R3   R>   R    RW   R#   R(   RH   RF   (    (    (    s%   lib/python2.7/site-packages/typing.pyRl     s   					c         C@ s   |  S(   u5  This decorator can be used to indicate to type checkers that
    the decorated method cannot be overridden, and decorated class
    cannot be subclassed. For example:

        class Base:
            @final
            def done(self) -> None:
                ...
        class Sub(Base):
            def done(self) -> None:  # Error reported by type checker
                ...
        @final
        class Leaf:
            ...
        class Other(Leaf):  # Error reported by type checker
            ...

    There is no runtime checking of these properties.
    (    (   t   f(    (    s%   lib/python2.7/site-packages/typing.pyt   final  s    t   _LiteralMetac           B@ s   e  Z d  Z d   Z RS(   u   Metaclass for _Literalc         C@ s2   |  j  |  t t |   j |  | | |  } | S(   N(   R   R   Rp   R   (   R   R   R   R   R   (    (    s%   lib/python2.7/site-packages/typing.pyR   '  s    !(   R   R&   R)   R   (    (    (    s%   lib/python2.7/site-packages/typing.pyRp   $  s   t   _Literalc           B@ sS   e  Z d  Z e Z d Z d	 d  Z d   Z d   Z	 d   Z
 d   Z d   Z RS(
   u  A type that can be used to indicate to type checkers that the
    corresponding value has a value literally equivalent to the
    provided parameter. For example:

        var: Literal[4] = 4

    The type checker understands that 'var' is literally equal to the
    value 4 and no other value.

    Literal[...] cannot be subclassed. There is no runtime checking
    verifying that the parameter is actually a value instead of a type.
    u
   __values__c         K@ s   | |  _  d  S(   N(   t
   __values__(   R   t   valuesR   (    (    s%   lib/python2.7/site-packages/typing.pyR    >  s    c         C@ si   t  |   } |  j d  k rI t | t  s6 | f } n  | d | d t  St d j | j d    d  S(   NRs   Rg   u    {} cannot be further subscriptedi   (	   R0   Rr   R>   R   R/   R5   R   Rh   R   (   R   Ri   R   (    (    s%   lib/python2.7/site-packages/typing.pyRW   A  s    	c         C@ s   |  S(   N(    (   R   R!   R"   (    (    s%   lib/python2.7/site-packages/typing.pyR#   K  s    c         C@ sS   t  t |   j   } |  j d  k	 rO | d j d j t t |  j    7} n  | S(   Nu   [{}]u   , (	   R   Rq   R(   Rr   R>   Rh   R   R   R   (   R   Rj   (    (    s%   lib/python2.7/site-packages/typing.pyR(   N  s    +c         C@ s   t  t |   j |  j f  S(   N(   RG   R0   R   Rr   (   R   (    (    s%   lib/python2.7/site-packages/typing.pyRH   T  s    c         C@ s<   t  | t  s t S|  j d  k	 r2 |  j | j k S|  | k S(   N(   R   Rq   RD   Rr   R>   (   R   RE   (    (    s%   lib/python2.7/site-packages/typing.pyRF   W  s
    (   u
   __values__N(   R   R&   R)   Rp   R2   R3   R>   R    RW   R#   R(   RH   RF   (    (    (    s%   lib/python2.7/site-packages/typing.pyRq   -  s   	
			t   AnyMetac           B@ s   e  Z d  Z d   Z RS(   u   Metaclass for Any.c         C@ s2   |  j  |  t t |   j |  | | |  } | S(   N(   R   R   Rt   R   (   R   R   R   R   R   (    (    s%   lib/python2.7/site-packages/typing.pyR   e  s    !(   R   R&   R)   R   (    (    (    s%   lib/python2.7/site-packages/typing.pyRt   b  s   t   _Anyc           B@ s,   e  Z d  Z e Z d Z d   Z d   Z RS(   u`  Special type indicating an unconstrained type.

    - Any is compatible with every type.
    - Any assumed to have all methods.
    - All values assumed to be instances of Any.

    Note that all the above statements are true from the point of view of
    static type checkers. At runtime, Any should not be used with instance
    or class checks.
    c         C@ s   t  d   d  S(   Nu%   Any cannot be used with isinstance().(   R   (   R   RI   (    (    s%   lib/python2.7/site-packages/typing.pyRJ   y  s    c         C@ s   t  d   d  S(   Nu%   Any cannot be used with issubclass().(   R   (   R   R   (    (    s%   lib/python2.7/site-packages/typing.pyRK   |  s    (    (   R   R&   R)   Rt   R2   R3   RJ   RK   (    (    (    s%   lib/python2.7/site-packages/typing.pyRu   k  s
   
	t   NoReturnMetac           B@ s   e  Z d  Z d   Z RS(   u   Metaclass for NoReturn.c         C@ s2   |  j  |  t t |   j |  | | |  } | S(   N(   R   R   Rv   R   (   R   R   R   R   R   (    (    s%   lib/python2.7/site-packages/typing.pyR     s    !(   R   R&   R)   R   (    (    (    s%   lib/python2.7/site-packages/typing.pyRv     s   t	   _NoReturnc           B@ s,   e  Z d  Z e Z d Z d   Z d   Z RS(   u  Special type indicating functions that never return.
    Example::

      from typing import NoReturn

      def stop() -> NoReturn:
          raise Exception('no way')

    This type is invalid in other positions, e.g., ``List[NoReturn]``
    will fail in static type checkers.
    c         C@ s   t  d   d  S(   Nu*   NoReturn cannot be used with isinstance().(   R   (   R   RI   (    (    s%   lib/python2.7/site-packages/typing.pyRJ     s    c         C@ s   t  d   d  S(   Nu*   NoReturn cannot be used with issubclass().(   R   (   R   R   (    (    s%   lib/python2.7/site-packages/typing.pyRK     s    (    (   R   R&   R)   Rv   R2   R3   RJ   RK   (    (    (    s%   lib/python2.7/site-packages/typing.pyRw     s
   	t   TypeVarMetac           B@ s   e  Z d    Z RS(   c         C@ s,   |  j  |  t t |   j |  | | |  S(   N(   R   R   Rx   R   (   R   R   R   R   (    (    s%   lib/python2.7/site-packages/typing.pyR     s    (   R   R&   R   (    (    (    s%   lib/python2.7/site-packages/typing.pyRx     s   RR   c           B@ sG   e  Z d  Z e Z d Z d   Z d   Z d   Z d	   Z	 d
   Z
 RS(   u  Type variable.

    Usage::

      T = TypeVar('T')  # Can be anything
      A = TypeVar('A', str, bytes)  # Must be str or bytes

    Type variables exist primarily for the benefit of static type
    checkers.  They serve as the parameters for generic types as well
    as for generic function definitions.  See class Generic for more
    information on generic types.  Generic functions work as follows:

      def repeat(x: T, n: int) -> List[T]:
          '''Return a list containing n references to x.'''
          return [x]*n

      def longest(x: A, y: A) -> A:
          '''Return the longest of two strings.'''
          return x if len(x) >= len(y) else y

    The latter example's signature is essentially the overloading
    of (str, str) -> str and (bytes, bytes) -> bytes.  Also note
    that if the arguments are instances of some subclass of str,
    the return type is still plain str.

    At runtime, isinstance(x, T) and issubclass(C, T) will raise TypeError.

    Type variables defined with covariant=True or contravariant=True
    can be used do declare covariant or contravariant generic types.
    See PEP 484 for more details. By default generic types are invariant
    in all type variables.

    Type variables can be introspected. e.g.:

      T.__name__ == 'T'
      T.__constraints__ == ()
      T.__covariant__ == False
      T.__contravariant__ = False
      A.__constraints__ == (str, bytes)
    u   __name__u	   __bound__u   __constraints__u   __covariant__u   __contravariant__c         @ s)  t  t |   j | | |  | j d d   } | j d t  } | j d t  } | |  _ | rv | rv t d   n  t |  |  _	 t |  |  _
 | r | d  k	 r t d   n  | r t |  d k r t d   n  d   t   f d	   | D  |  _ | rt | d
  |  _ n	 d  |  _ d  S(   Nu   boundu	   covariantu   contravariantu"   Bivariant types are not supported.u-   Constraints cannot be combined with bound=...i   u"   A single constraint is not allowedu:   TypeVar(name, constraint, ...): constraints must be types.c         3@ s   |  ] } t  |    Vq d  S(   N(   RB   (   t   .0RY   (   R`   (    s%   lib/python2.7/site-packages/typing.pys	   <genexpr>  s    u   Bound must be a type.(   R   RR   R    t   getR>   R*   R   t
   ValueErrort   boolt   __covariant__t   __contravariant__R   R.   R/   RS   RB   t	   __bound__(   R   R   t   constraintst   kwargst   boundt	   covariantt   contravariant(    (   R`   s%   lib/python2.7/site-packages/typing.pyR      s$    	c         C@ s    |  | k r | j  |   n  d  S(   N(   t   append(   R   R$   (    (    s%   lib/python2.7/site-packages/typing.pyR%     s    c         C@ s5   |  j  r d } n |  j r$ d } n d } | |  j S(   Nu   +u   -u   ~(   R}   R~   R   (   R   t   prefix(    (    s%   lib/python2.7/site-packages/typing.pyR(     s    				c         C@ s   t  d   d  S(   Nu0   Type variables cannot be used with isinstance().(   R   (   R   t   instance(    (    s%   lib/python2.7/site-packages/typing.pyRJ     s    c         C@ s   t  d   d  S(   Nu0   Type variables cannot be used with issubclass().(   R   (   R   R   (    (    s%   lib/python2.7/site-packages/typing.pyRK     s    (   u   __name__u	   __bound__u   __constraints__u   __covariant__u   __contravariant__(   R   R&   R)   Rx   R2   R3   R    R%   R(   RJ   RK   (    (    (    s%   lib/python2.7/site-packages/typing.pyRR     s   ( 					u   Tu   KTu   VTu   T_coR   u   V_cou   VT_cou   T_contraR   c         C@ s   | d k r g  } n  t |  d  rI t |  t t f  rI |  j | |  St |  t  r x1 t |  D]  \ } } |  | k re | | Sqe Wn  |  S(   u   An internal helper function: replace arg if it is a type variable
    found in tvars with corresponding substitution from args or
    with corresponding substitution sub-tree if arg is a generic type.
    u
   _subs_treeN(   R>   t   hasattrR   t   GenericMetaR-   t
   _subs_treeRR   t	   enumerate(   R@   R$   R   t   it   tvar(    (    s%   lib/python2.7/site-packages/typing.pyt   _replace_arg  s    	$c   	      C@ s   |  j  d k r |  S|  j  } g  } x) | j  d k	 rM | j |  | j  } q% Wg  } x* |  j D] } | j t | | |   q^ WxJ | D]B } g  } x- | j D]" } | j t | | j |   q W| } q W| S(   u  An internal helper function: calculate substitution tree
    for generic cls after replacing its type parameters with
    substitutions in tvars -> args (if any).
    Repeat the same following __origin__'s.

    Return a list of arguments with all possible substitutions
    performed. Arguments that are generic classes themselves are represented
    as tuples (so that no new classes are created by this function).
    For example: _subs_tree(List[Tuple[int, T]][str]) == [(Tuple, int, str)]
    N(   t
   __origin__R>   R   t   __args__R   t   __parameters__(	   R   R$   R   t   currentt
   orig_chaint	   tree_argsR@   t   oclst   new_tree_args(    (    s%   lib/python2.7/site-packages/typing.pyR   ,  s     	 
c         @ s  g  } x |  D] } t  | t  rD | j t k rD | j | j  q t  | t  r t |  d k r | d t k r | j | d  q | j |  q Wt	 |    t    t |  k  rg  } x7 | D]/ } |   k r | j |    j
 |  q q W| }   st     n  t	 |    xV | D]N  t   t  sHq-n  t  f d      h D  r-  j
   q-q-Wt   f d   | D  S(   u   An internal helper for Union creation and substitution: flatten Union's
    among parameters, then remove duplicates and strict subclasses.
    i    i   c         3@ sK   |  ]A } t  | t  o$ | j d  k	 s t  | t  oB t   |  Vq d  S(   N(   R   R   R   R>   R0   RT   (   Ry   t   t2(   t   t1(    s%   lib/python2.7/site-packages/typing.pys	   <genexpr>n  s   c         3@ s!   |  ] } |   k r | Vq d  S(   N(    (   Ry   RY   (   t
   all_params(    s%   lib/python2.7/site-packages/typing.pys	   <genexpr>s  s    (   R   t   _UnionR   t   Uniont   extendR   R/   R.   R   t   sett   removeRM   R0   t   any(   t
   parameterst   paramst   pt
   new_paramsRY   (    (   R   R   s%   lib/python2.7/site-packages/typing.pyt   _remove_dups_flattenM  s0    1c         C@ s   |  j  s" t d t |     n  t |  } t |  j   } | | k r t d | | k ra d n d t |   | | f   n  d  S(   Nu   %s is not a generic classu0   Too %s parameters for %s; actual %s, expected %su   manyu   few(   R   R   RN   R.   (   R   R   t   alent   elen(    (    s%   lib/python2.7/site-packages/typing.pyt   _check_genericv  s    	c         @ sD   d  i    t  j   j  t j       f d    } | S(   Ni   c          @ sw   |  } y   | SWn^ t  k
 r,  |    St k
 rr  |    } t     k rd   j   n  |   | <| SXd  S(   N(   R   t   KeyErrorR.   t   clear(   R   t   keyt   value(   t   cachet   funct   maxsize(    s%   lib/python2.7/site-packages/typing.pyt   inner  s    

(   t	   _cleanupsR   R   t	   functoolst   wraps(   R   R   (    (   R   R   R   s%   lib/python2.7/site-packages/typing.pyt	   _tp_cache  s
    $t	   UnionMetac           B@ s   e  Z d  Z d   Z RS(   u   Metaclass for Union.c         C@ s,   |  j  |  t t |   j |  | | |  S(   N(   R   R   R   R   (   R   R   R   R   (    (    s%   lib/python2.7/site-packages/typing.pyR     s    (   R   R&   R)   R   (    (    (    s%   lib/python2.7/site-packages/typing.pyR     s   R   c           B@ s   e  Z d  Z e Z d Z d d d  Z d   Z d   Z	 d   Z
 d	   Z e d
    Z d d d  Z d   Z d   Z d   Z d   Z RS(   u  Union type; Union[X, Y] means either X or Y.

    To define a union, use e.g. Union[int, str].  Details:

    - The arguments must be types and there must be at least one.

    - None as an argument is a special case and is replaced by
      type(None).

    - Unions of unions are flattened, e.g.::

        Union[Union[int, str], float] == Union[int, str, float]

    - Unions of a single argument vanish, e.g.::

        Union[int] == int  # The constructor actually returns int

    - Redundant arguments are skipped, e.g.::

        Union[int, str, int] == Union[int, str]

    - When comparing unions, the argument order is ignored, e.g.::

        Union[int, str] == Union[str, int]

    - When two arguments have a subclass relationship, the least
      derived argument is kept, e.g.::

        class Employee: pass
        class Manager(Employee): pass
        Union[int, Employee, Manager] == Union[int, Employee]
        Union[Manager, int, Employee] == Union[int, Employee]
        Union[Employee, Manager] == Employee

    - Similar for object::

        Union[int, object] == object

    - You cannot subclass or instantiate a union.

    - You can use Optional[X] as a shorthand for Union[X, None].
    u   __parameters__u   __args__u
   __origin__u   __tree_hash__c         O@ s  t  t |   j |  | | | |  } | d  k rd d  | _ d  | _ d  | _ t t d   | _	 | St
 | t  s t d   n  | t k r t |  } t |  d k r | d Sn  t |  | _ | | _ | | _ | j   } t
 | t  rt t |   | _	 n t |  | _	 | S(   Nu   Unionu   Expected parameters=<tuple>i   i    (   u   Union(   R   R   R   R>   R   R   R   RG   t	   frozensett   __tree_hash__R   R/   R   R   R   R.   RZ   R   (   R   R   t   originR   R   R   t	   subs_tree(    (    s%   lib/python2.7/site-packages/typing.pyR     s*    $					c         @ s   |  j  d  k r |  St    f d   |  j  D  } t |  j     } | |  j  k rl | |  j k rl |  S|  j | | d t S(   Nc         3@ s!   |  ] } t  |     Vq d  S(   N(   R#   (   Ry   RY   (   R!   R"   (    s%   lib/python2.7/site-packages/typing.pys	   <genexpr>  s    Rg   (   R   R>   R/   R#   R   RU   R5   (   R   R!   R"   t   ev_argst	   ev_origin(    (   R!   R"   s%   lib/python2.7/site-packages/typing.pyR#     s    "c         C@ s)   |  j  r% |  j r% t |  j |  n  d  S(   N(   R   R   R%   (   R   R$   (    (    s%   lib/python2.7/site-packages/typing.pyR%     s    c         C@ sX   |  j  d  k r" t t |   j   S|  j   } t | t  sG t |  S| d j	 |  S(   Ni    (
   R   R>   R   R   R(   R   R   R/   RN   t
   _tree_repr(   R   t   tree(    (    s%   lib/python2.7/site-packages/typing.pyR(     s    
c         C@ s~   g  } xQ | d D]E } t  | t  s< | j t |   q | j | d j |   q Wt t |   j   d d j |  S(   Ni   i    u   [%s]u   , (	   R   R/   R   R   R   R   R   R(   R   (   R   R   t   arg_listR@   (    (    s%   lib/python2.7/site-packages/typing.pyR     s    c         @ s   | d k r t  d   n  t | t  s6 | f } n  |  j d  k rN d   n d   t   f d   | D  } |  t k	 r t |  |  n  |  j | d |  d t S(   Nu    Cannot take a Union of no types.u)   Union[arg, ...]: each arg must be a type.u*   Parameters to generic types must be types.c         3@ s   |  ] } t  |    Vq d  S(   N(   RB   (   Ry   R   (   R`   (    s%   lib/python2.7/site-packages/typing.pys	   <genexpr>  s    R   Rg   (    (	   R   R   R/   R   R>   R   R   RU   R5   (   R   R   (    (   R`   s%   lib/python2.7/site-packages/typing.pyRW     s    	c         C@ sS   |  t  k r t  St |  | |  } t |  } t |  d k rH | d St  f | S(   Ni   i    (   R   R   R   R.   (   R   R$   R   R   (    (    s%   lib/python2.7/site-packages/typing.pyR     s    c         C@ sI   t  | t  r |  j | j k S|  t k	 r; |  j   | k S|  | k Sd  S(   N(   R   R   R   R   R   (   R   RE   (    (    s%   lib/python2.7/site-packages/typing.pyRF   %  s
    c         C@ s   |  j  S(   N(   R   (   R   (    (    s%   lib/python2.7/site-packages/typing.pyRH   -  s    c         C@ s   t  d   d  S(   Nu(   Unions cannot be used with isinstance().(   R   (   R   RI   (    (    s%   lib/python2.7/site-packages/typing.pyRJ   0  s    c         C@ s   t  d   d  S(   Nu(   Unions cannot be used with issubclass().(   R   (   R   R   (    (    s%   lib/python2.7/site-packages/typing.pyRK   3  s    (   u   __parameters__u   __args__u
   __origin__u   __tree_hash__N(   R   R&   R)   R   R2   R3   R>   R   R#   R%   R(   R   R   RW   R   RF   RH   RJ   RK   (    (    (    s%   lib/python2.7/site-packages/typing.pyR     s   *	
								t   OptionalMetac           B@ s   e  Z d  Z d   Z RS(   u   Metaclass for Optional.c         C@ s,   |  j  |  t t |   j |  | | |  S(   N(   R   R   R   R   (   R   R   R   R   (    (    s%   lib/python2.7/site-packages/typing.pyR   =  s    (   R   R&   R)   R   (    (    (    s%   lib/python2.7/site-packages/typing.pyR   :  s   t	   _Optionalc           B@ s)   e  Z d  Z e Z d Z e d    Z RS(   uE   Optional type.

    Optional[X] is equivalent to Union[X, None].
    c         C@ s#   t  | d  } t | t d   f S(   Nu#   Optional[t] requires a single type.(   RB   R   R0   R>   (   R   R@   (    (    s%   lib/python2.7/site-packages/typing.pyRW   K  s    (    (   R   R&   R)   R   R2   R3   R   RW   (    (    (    s%   lib/python2.7/site-packages/typing.pyR   B  s   c         C@ s`   t  } xS t |  j d   D]> \ } } t | t  r | j t k r |  j | d } q q W| S(   u   Helper for Generic.__new__.

    Returns the class after the last occurrence of Generic or
    Generic[...] in cls.__mro__.
    ii   (   t   objectR   t   __mro__R   R   R]   R^   (   R   t   next_in_mroR   t   c(    (    s%   lib/python2.7/site-packages/typing.pyt   _next_in_mroT  s
     c         C@ s4   t  |  j t j  r! d   } n	 d   } t |  S(   u   Construct a __subclasshook__ callable that incorporates
    the associated __extra__ class in subclass checks performed
    against cls.
    c         S@ s   |  j  j |  } | t k	 r" | S|  j  t | d d  k rA t Sx? |  j  j   D]. } t | t  rl qQ n  t | |  rQ t SqQ Wt S(   Nu   __mro__(    (	   t	   __extra__t   __subclasshook__RD   R\   R5   t   __subclasses__R   R   RT   (   R   t   subclasst   rest   scls(    (    s%   lib/python2.7/site-packages/typing.pyt   __extrahook__k  s    c         S@ s#   |  j  r t | |  j   r t St S(   N(   R   RT   R5   RD   (   R   R   (    (    s%   lib/python2.7/site-packages/typing.pyR   y  s    (   R   R   t   abct   ABCMetaR,   (   R   R   (    (    s%   lib/python2.7/site-packages/typing.pyt   _make_subclasshookb  s    	R   c           B@ s   e  Z d  Z d d d d d d  Z d   Z e d    Z e j d    Z e d    Z	 e	 j d    Z	 d   Z
 d   Z d	   Z d
   Z d d d  Z d   Z d   Z e d    Z d   Z d   Z d   Z RS(   uc  Metaclass for generic types.

    This is a metaclass for typing.Generic and generic ABCs defined in
    typing module. User defined subclasses of GenericMeta can override
    __new__ and invoke super().__new__. Note that GenericMeta.__new__
    has strict rules on what is allowed in its bases argument:
    * plain Generic is disallowed in bases;
    * Generic[...] should appear in bases at most once;
    * if Generic[...] is present, then it should list all type variables
      that appear in other bases.
    In addition, type of all generic bases is erased, e.g., C[int] is
    stripped to plain C.
    c	         @ s  | d k	 rC | d k	 s t  t d   | D  st |   nt| d k s[ t |   | d k ss t |   | d k s t |   t |  } d }	 xt | D]l }
 |
 t k r t d   n  t |
 t  r |
 j t t	 f k r |	 d k	 rt d   n  |
 j
 }	 q q W|	 d k r)| }	 n t |  } t |	    |   k st d d j   f d   | D  t d   | D  rd n d	 d j d
   |	 D  f   n  |	 } | } | d k r| j d  } n  | d k	 rt |  t j k r| | k r| f | } n  t d   | D  } t d   | D  r]t d   | D  } n  | j i | d 6| d 6 t t |   j |  | | |  } t t |  j d | s| n | j  | | _
 | rt d   | D  n d | _ t |  | _ | d k r| | _ n  d | k r(| sCt | j d d  d k rUt |  | _ n  | ryt | d  ry| j  | _  n  | rt! | j"    n t t |  j#   | _$ | S(   u   Create a new generic class. GenericMeta.__new__ accepts
        keyword arguments that are used for internal bookkeeping, therefore
        an override should pass unused keyword arguments to super().
        c         s@ s   |  ] } t  | t  Vq d  S(   N(   R   RR   (   Ry   RY   (    (    s%   lib/python2.7/site-packages/typing.pys	   <genexpr>  s    u!   Cannot inherit from plain GenericuA   Cannot inherit from Generic[...] or Protocol[...] multiple times.u1   Some type variables (%s) are not listed in %s[%s]u   , c         3@ s'   |  ] } |   k r t  |  Vq d  S(   N(   R   (   Ry   RY   (   t   gvarset(    s%   lib/python2.7/site-packages/typing.pys	   <genexpr>  s    c         s@ s   |  ] } | j  t k Vq d  S(   N(   R   R^   (   Ry   t   b(    (    s%   lib/python2.7/site-packages/typing.pys	   <genexpr>  s   u   Genericu   Protocolc         s@ s   |  ] } t  |  Vq d  S(   N(   R   (   Ry   t   g(    (    s%   lib/python2.7/site-packages/typing.pys	   <genexpr>  s    u	   __extra__c         s@ s-   |  ]# } t  | t  r! | j n | Vq d  S(   N(   R   R   R]   (   Ry   R   (    (    s%   lib/python2.7/site-packages/typing.pys	   <genexpr>  s    c         s@ s*   |  ]  } t  | t  o! | t k	 Vq d  S(   N(   R   R   R^   (   Ry   R   (    (    s%   lib/python2.7/site-packages/typing.pys	   <genexpr>  s    c         s@ s!   |  ] } | t  k	 r | Vq d  S(   N(   R^   (   Ry   R   (    (    s%   lib/python2.7/site-packages/typing.pys	   <genexpr>  s    u
   __origin__u   _gorgc         s@ s9   |  ]/ } | t  k r t n | t k r- d n | Vq d  S(   N(    (   t   _TypingEllipsisRa   t   _TypingEmpty(   Ry   t   a(    (    s%   lib/python2.7/site-packages/typing.pys	   <genexpr>  s   u   __subclasshook__u   __name__u    u   __extrahook__u   __qualname__N(%   R>   RM   t   allRZ   R^   R   R   R   R   R_   R   R   R   R   Rz   R0   R   R   R/   t   updateR   R   t   __setattr__R]   R   R   t   __next_in_mro__t   __orig_bases__R\   R   R   R   R   RG   R   RH   R   (   R   R   R   R   R$   R   R   t   extrat
   orig_basest   gvarsR   t   tvarsett   initial_basesR   (    (   R   s%   lib/python2.7/site-packages/typing.pyR     sl    %		#-!	%c         O@ s   t  t |   j | |   t |  j t j  rO |  j j |  _ |  j j |  _ n0 |  j	 d  k	 r |  j	 j |  _ |  j	 j |  _ n  d  S(   N(   R   R   R    R   R   R   R   t   _abc_registryt
   _abc_cacheR   R>   (   R   R   R   (    (    s%   lib/python2.7/site-packages/typing.pyR      s    c         C@ s)   t  |  j t j  r |  j j S|  j j S(   N(   R   R   R   R   t   _abc_negative_cacheR]   t   _abc_generic_negative_cache(   R   (    (    s%   lib/python2.7/site-packages/typing.pyR     s    
c         C@ sC   |  j  d  k r? t |  j t j  r3 | |  j _ q? | |  _ n  d  S(   N(   R   R>   R   R   R   R   R   R   (   R   R   (    (    s%   lib/python2.7/site-packages/typing.pyR     s    c         C@ s)   t  |  j t j  r |  j j S|  j j S(   N(   R   R   R   R   t   _abc_negative_cache_versionR]   t#   _abc_generic_negative_cache_version(   R   (    (    s%   lib/python2.7/site-packages/typing.pyR     s    
c         C@ sC   |  j  d  k r? t |  j t j  r3 | |  j _ q? | |  _ n  d  S(   N(   R   R>   R   R   R   R   R   R   (   R   R   (    (    s%   lib/python2.7/site-packages/typing.pyR     s    c         C@ s)   |  j  r% |  j r% t |  j |  n  d  S(   N(   R   R   R%   (   R   R$   (    (    s%   lib/python2.7/site-packages/typing.pyR%     s    c         @ s   |  j  r |  j  j     n d  } |  j rO t    f d   |  j D  n d  } | |  j  k rw | |  j k rw |  S|  j |  j |  j t |  j	  d | r t
 |  n d  d | d | d |  j d |  j S(   Nc         3@ s!   |  ] } t  |     Vq d  S(   N(   R#   (   Ry   R   (   R!   R"   (    s%   lib/python2.7/site-packages/typing.pys	   <genexpr>  s    R$   R   R   R   R   (   R   R#   R>   R   R/   RU   R   t	   __bases__t   dictt   __dict__RZ   R   R   (   R   R!   R"   R   R   (    (   R!   R"   s%   lib/python2.7/site-packages/typing.pyR#     s    $1	c         C@ s5   |  j  d  k r" t t |   j   S|  j |  j    S(   N(   R   R>   R   R   R(   R   R   (   R   (    (    s%   lib/python2.7/site-packages/typing.pyR(   (  s    c         C@ s   g  } xm | d D]a } | d k r3 | j  d  q t | t  sX | j  t |   q | j  | d j |   q Wt t |   j   d d j |  S(   Ni   u   ()i    u   [%s]u   , (    (	   R   R   R/   R   R   R   R   R(   R   (   R   R   R   R@   (    (    s%   lib/python2.7/site-packages/typing.pyR   -  s    c         C@ s9   |  j  d  k r |  St |  | |  } |  j f t |  S(   N(   R   R>   R   R]   R/   (   R   R$   R   R   (    (    s%   lib/python2.7/site-packages/typing.pyR   8  s    c         C@ sK   t  | t  s t S|  j d  k s1 | j d  k r; |  | k S|  j | j k S(   N(   R   R   RD   R   R>   R   (   R   RE   (    (    s%   lib/python2.7/site-packages/typing.pyRF   >  s
    
c         C@ s   |  j  S(   N(   R   (   R   (    (    s%   lib/python2.7/site-packages/typing.pyRH   E  s    c         @ s  t  | t  s | f } n  | rJ |  j t k	 rJ t d t |     n  d   t   f d   | D  } |  t t f k r t d   | D  s t d |  j	   n  t
 t |   t
 |  k r t d |  j	   n  | } | } nt |  t t f k rt |  } | } nM |  j t t f k rBt d t |     n t |  |  t |  } | } |  j d  k ry|  f n d } |  j |  j	 | |  j t |  j  d | d	 | d
 |  d |  j d |  j S(   Nu)   Parameter list to %s[...] cannot be emptyu*   Parameters to generic types must be types.c         3@ s   |  ] } t  |    Vq d  S(   N(   RB   (   Ry   R   (   R`   (    s%   lib/python2.7/site-packages/typing.pys	   <genexpr>P  s    c         s@ s   |  ] } t  | t  Vq d  S(   N(   R   RR   (   Ry   R   (    (    s%   lib/python2.7/site-packages/typing.pys	   <genexpr>S  s    u0   Parameters to %s[...] must all be type variablesu(   Parameters to %s[...] must all be uniqueu'   Cannot subscript already-subscripted %sR$   R   R   R   R   (    (   R   R/   R]   t   TupleR   R	   R^   R_   R   R   R.   R   t   CallableRZ   R   RN   R   R>   RU   R   R   R   R   R   (   R   R   R$   R   t   prepend(    (   R`   s%   lib/python2.7/site-packages/typing.pyRW   H  sD    		
	c         C@ s   |  j  d  k	 ri d d d g } t j d  j d | k sV t j d  j d | k rZ t St d   n  |  t k r t d |    n  t t	 |   j
 |  S(	   Nu   abcu	   functoolsu   singledispatchi   u   __name__i   uC   Parameterized generics cannot be used with class or instance checksu5   Class %r cannot be used with class or instance checks(   R   R>   R   t	   _getframet	   f_globalsR*   R   R^   R   R   RK   (   R   R   R   (    (    s%   lib/python2.7/site-packages/typing.pyRK   r  s    c         C@ s#   t  | d  r t | j |   St S(   Nu	   __class__(   R   RT   RU   R*   (   R   R   (    (    s%   lib/python2.7/site-packages/typing.pyRJ     s    c         C@ si   | j  d  r | j d  s- | j  d  rI t t |   j | |  n t t |  j  j | |  d  S(   Nu   __u   _abc_(   R
   t   endswithR   R   R   R]   (   R   t   attrR   (    (    s%   lib/python2.7/site-packages/typing.pyR     s    N(   R   R&   R)   R>   R   R    t   propertyR   t   setterR   R%   R#   R(   R   R   RF   RH   R   RW   RK   RJ   R   (    (    (    s%   lib/python2.7/site-packages/typing.pyR     s$   [							*		
c      	   C@ s@   |  j  |  j |  j t |  j  |  j |  j |  j |  j |  j	  S(   uB   Hack to work around https://bugs.python.org/issue11480 on Python 2(
   RU   R   R   R   R   R   R   R   R   R   (   R   (    (    s%   lib/python2.7/site-packages/typing.pyt   _copy_generic  s    c         O@ s   | j  d  k rV |  j t j k r@ | j t j k	 r@ |  j |  S|  j | | |  Sn | j } |  j t j k r | j t j k	 r |  j |  } n |  j | | |  } y | | _ Wn t k
 r n X| j | |   | Sd  S(   N(   R   R>   R   R   R    R]   t   __orig_class__t   AttributeError(   t   base_clsR   R   R   R   RI   (    (    s%   lib/python2.7/site-packages/typing.pyt   _generic_new  s     	R^   c           B@ s#   e  Z d  Z e Z d Z d   Z RS(   uC  Abstract base class for generic types.

    A generic type is typically declared by inheriting from
    this class parameterized with one or more type variables.
    For example, a generic mapping type might be defined as::

      class Mapping(Generic[KT, VT]):
          def __getitem__(self, key: KT) -> VT:
              ...
          # Etc.

    This class can then be used as follows::

      def lookup_name(mapping: Mapping[KT, VT], key: KT, default: VT) -> VT:
          try:
              return mapping[key]
          except KeyError:
              return default
    c         O@ s4   |  j  t k r t d   n  t |  j |  | |  S(   NuH   Type Generic cannot be instantiated; it can be used only as a base class(   R]   R^   R   R   R   (   R   R   R   (    (    s%   lib/python2.7/site-packages/typing.pyR     s    (    (   R   R&   R)   R   R2   R3   R   (    (    (    s%   lib/python2.7/site-packages/typing.pyR^     s   R   c           B@ s   e  Z d  Z RS(   u   Internal placeholder for () or []. Used by TupleMeta and CallableMeta
    to allow empty list/tuple in specific places, without allowing them
    to sneak in where prohibited.
    (   R   R&   R)   (    (    (    s%   lib/python2.7/site-packages/typing.pyR     s   R   c           B@ s   e  Z d  Z RS(   u(   Internal placeholder for ... (ellipsis).(   R   R&   R)   (    (    (    s%   lib/python2.7/site-packages/typing.pyR     s   t	   TupleMetac           B@ s/   e  Z d  Z e d    Z d   Z d   Z RS(   u   Metaclass for Tuple (internal).c         @ s  |  j  d  k	 s |  j t k	 r4 t t |   j |  S| d k rY t t |   j t f  St | t	  st | f } n  t
 |  d k r | d t k r d   t | d    } t t |   j | t f  Sd   t	   f d   | D  } t t |   j |  S(   Ni   i   u    Tuple[t, ...]: t must be a type.i    u*   Tuple[t0, t1, ...]: each t must be a type.c         3@ s   |  ] } t  |    Vq d  S(   N(   RB   (   Ry   R   (   R`   (    s%   lib/python2.7/site-packages/typing.pys	   <genexpr>  s    (    (   R   R>   R]   R   R   R   RW   R   R   R/   R.   Ra   RB   R   (   R   R   R   (    (   R`   s%   lib/python2.7/site-packages/typing.pyRW     s    "c         C@ s,   |  j  d  k r t | t  St d   d  S(   Nu5   Parameterized Tuple cannot be used with isinstance().(   R   R>   R   R/   R   (   R   RI   (    (    s%   lib/python2.7/site-packages/typing.pyRJ     s    c         C@ s,   |  j  d  k r t | t  St d   d  S(   Nu5   Parameterized Tuple cannot be used with issubclass().(   R   R>   RT   R/   R   (   R   R   (    (    s%   lib/python2.7/site-packages/typing.pyRK     s    (   R   R&   R)   R   RW   RJ   RK   (    (    (    s%   lib/python2.7/site-packages/typing.pyR     s   	R   c           B@ s)   e  Z d  Z e Z e Z d Z d   Z RS(   u@  Tuple type; Tuple[X, Y] is the cross-product type of X and Y.

    Example: Tuple[T1, T2] is a tuple of two elements corresponding
    to type variables T1 and T2.  Tuple[int, float, str] is a tuple
    of an int, a float and a string.

    To specify a variable-length tuple of homogeneous type, use Tuple[T, ...].
    c         O@ s1   |  j  t k r t d   n  t t |  | |  S(   Nu6   Type Tuple cannot be instantiated; use tuple() instead(   R]   R   R   R   R/   (   R   R   R   (    (    s%   lib/python2.7/site-packages/typing.pyR     s    (    (	   R   R&   R)   R   R2   R/   R   R3   R   (    (    (    s%   lib/python2.7/site-packages/typing.pyR     s
   t   CallableMetac           B@ s8   e  Z d  Z d   Z d   Z d   Z e d    Z RS(   u    Metaclass for Callable.c         C@ s5   |  j  d  k r" t t |   j   S|  j |  j    S(   N(   R   R>   R   R   R(   R   R   (   R   (    (    s%   lib/python2.7/site-packages/typing.pyR(   &  s    c         C@ s   |  j  t k	 r% t t |   j |  Sg  } xQ | d D]E } t | t  sa | j t |   q6 | j | d j |   q6 W| d d k r t	 | d  d | d St	 | d  d d j
 | d   | d f S(   Ni   i    u   ...u	   [..., %s]u
   [[%s], %s]u   , i(   R]   R   R   R   R   R   R/   R   R   RN   R   (   R   R   R   R@   (    (    s%   lib/python2.7/site-packages/typing.pyR   +  s    c         C@ s   |  j  d k	 s |  j t k	 r4 t t |   j |  St | t  sV t	 |  d k re t
 d   n  | \ } } | t k r t | f } n7 t | t  s t
 d | f   n  t |  | f } |  j |  S(   ux   A thin wrapper around __getitem_inner__ to provide the latter
        with hashable arguments to improve speed.
        i   u6   Callable must be used as Callable[[arg, ...], result].u8   Callable[args, result]: args must be a list. Got %.100r.N(   R   R>   R]   R   R   R   RW   R   R/   R.   R   Ra   t   listt   __getitem_inner__(   R   R   R   t   result(    (    s%   lib/python2.7/site-packages/typing.pyRW   ;  s    "c         @ s   | \ } } d   t  |    } | t k rI t t |   j t | f  Sd   t   f d   | D  } | | f } t t |   j |  S(   Nu.   Callable[args, result]: result must be a type.u6   Callable[[arg, ...], result]: each arg must be a type.c         3@ s   |  ] } t  |    Vq d  S(   N(   RB   (   Ry   R@   (   R`   (    s%   lib/python2.7/site-packages/typing.pys	   <genexpr>W  s    (   RB   Ra   R   R   RW   R   R/   (   R   R   R   R   (    (   R`   s%   lib/python2.7/site-packages/typing.pyR   O  s    (   R   R&   R)   R(   R   RW   R   R   (    (    (    s%   lib/python2.7/site-packages/typing.pyR   #  s
   			R   c           B@ s,   e  Z d  Z e Z e j Z d Z d   Z	 RS(   u  Callable type; Callable[[int], str] is a function of (int) -> str.

    The subscription syntax must always be used with exactly two
    values: the argument list and the return type.  The argument list
    must be a list of types or ellipsis; the return type must be a single type.

    There is no syntax to indicate optional or keyword arguments,
    such function types are rarely used as callback types.
    c         O@ s4   |  j  t k r t d   n  t |  j |  | |  S(   NuI   Type Callable cannot be instantiated; use a non-abstract subclass instead(   R]   R   R   R   R   (   R   R   R   (    (    s%   lib/python2.7/site-packages/typing.pyR   n  s    (    (
   R   R&   R)   R   R2   t   collections_abcR   R   R3   R   (    (    (    s%   lib/python2.7/site-packages/typing.pyR   _  s
   		c         C@ s   | S(   u   Cast a value to a type.

    This returns the value unchanged.  To the type checker this
    signals that the return value has the designated type, but at
    runtime we intentionally don't check anything (we want this
    to be as fast as possible).
    (    (   t   typt   val(    (    s%   lib/python2.7/site-packages/typing.pyt   castu  s    c   
      C@ s   |  j  } | j } | j } | |  } |  j p1 d } |  j } | rO t |  n i  } | t |  } x= t | | |  D]( \ } }	 | | k s t  |	 | | <qy W| S(   u:   Internal helper to extract the default arguments, by name.(    (	   t   __code__t   co_argcountt   co_varnamest   __defaults__t   __kwdefaults__R   R.   t   zipRM   (
   R   RA   t	   pos_countt	   arg_namest   defaultst
   kwdefaultsR   t
   pos_offsetR   R   (    (    s%   lib/python2.7/site-packages/typing.pyt   _get_defaults  s    			
	 c         C@ s   d S(   u:   In Python 2 this is not supported and always returns None.N(   R>   (   RI   R!   R"   (    (    s%   lib/python2.7/site-packages/typing.pyt   get_type_hints  s    c         C@ s   t  |  t  r |  j j   } xC |  j j   D]2 \ } } | |  j |  f k r. | j |  q. q. WxQ | j   D]@ } t  | t j	  r t
 | _ n  t  | t  rq t |  qq qq Wn  y t
 |  _ Wn t k
 r n X|  S(   uI  Decorator to indicate that annotations are not type hints.

    The argument must be a class or function; if it is a class, it
    applies recursively to all methods and classes defined in that class
    (but not to methods defined in its superclasses or subclasses).

    This mutates the function(s) or class(es) in place.
    (   R   R0   R   t   copyt   itemsR   t   popRs   RX   Rb   R5   t   __no_type_check__t   no_type_checkR   (   R@   t	   arg_attrsR   R   RI   (    (    s%   lib/python2.7/site-packages/typing.pyR    s    	c         @ s"   t  j      f d    } | S(   u   Decorator to give another decorator the @no_type_check effect.

    This wraps the decorator with something that wraps the decorated
    function in @no_type_check.
    c          @ s     |  |   } t  |  } | S(   N(   R  (   R   R   R   (   t	   decorator(    s%   lib/python2.7/site-packages/typing.pyt   wrapped_decorator  s    (   R   R   (   R  R  (    (   R  s%   lib/python2.7/site-packages/typing.pyt   no_type_check_decorator  s    c          O@ s   t  d   d S(   u*   Helper for @overload to raise when called.u   You should not call an overloaded function. A series of @overload-decorated functions outside a stub module should always be followed by an implementation that is not @overload-ed.N(   t   NotImplementedError(   R   R   (    (    s%   lib/python2.7/site-packages/typing.pyt   _overload_dummy  s    c         C@ s   t  S(   u
  Decorator for overloaded functions/methods.

    In a stub file, place two or more stub definitions for the same
    function in a row, each decorated with @overload.  For example:

      @overload
      def utf8(value: None) -> None: ...
      @overload
      def utf8(value: bytes) -> bytes: ...
      @overload
      def utf8(value: str) -> bytes: ...

    In a non-stub file (i.e. a regular .py file), do the same but
    follow it with an implementation.  The implementation should *not*
    be decorated with @overload.  For example:

      @overload
      def utf8(value: None) -> None: ...
      @overload
      def utf8(value: bytes) -> bytes: ...
      @overload
      def utf8(value: str) -> bytes: ...
      def utf8(value):
          # implementation goes here
    (   R  (   R   (    (    s%   lib/python2.7/site-packages/typing.pyt   overload  s    u
   Collectiont   _ProtocolMetac           B@ s2   e  Z d  Z d   Z d   Z d   Z d   Z RS(   u|   Internal metaclass for Protocol.

    This exists so Protocol classes can be generic without deriving
    from Generic.
    c         @ sO  t  t    j | |     j j d d   sM t d     j D    _ n    j r!x   j	 d D] } | t
 t f k p | j d k r | j t k p t | t  r | j p t | t  o | j t k sd t d |   qd qd Wt   f d     j   D    _ d   } |   _ n  d   } d	   j k rKt |    _ n  d  S(
   Nu   _is_protocolc         s@ s9   |  ]/ } | t  k p0 t | t  o0 | j t  k Vq d  S(   N(   R_   R   R  R   (   Ry   R   (    (    s%   lib/python2.7/site-packages/typing.pys	   <genexpr>  s   i   u   _abcollu7   Protocols can only inherit from other protocols, got %rc         3@ s$   |  ] } t  t   |   Vq d  S(   N(   R[   R\   (   Ry   R   (   R   (    s%   lib/python2.7/site-packages/typing.pys	   <genexpr>   s   c         _@ s"   t  |   j r t d   n  d  S(   Nu    Protocols cannot be instantiated(   R0   R+   R   (   R   R   R   (    (    s%   lib/python2.7/site-packages/typing.pyt   _no_init  s    c         S@ s   |  j  j d d   s t St | t  s7 t d   n  xV |  j   D]H } x? | j D]0 } | | j  k rT | j  | d  k r t SPqT qT Wt SqD Wt	 S(   Nu   _is_protocolu,   issubclass() arg 1 must be a new-style class(
   R   Rz   R>   RD   R   R0   R   t   _get_protocol_attrsR   R5   (   R   RE   R   R   (    (    s%   lib/python2.7/site-packages/typing.pyt   _proto_hook  s    u   __subclasshook__(   R   R  R    R   Rz   R>   R   R   R+   R   R   R^   R&   R   t   _PROTO_WHITELISTR   R   R   R   R   R   R  t   _callable_members_onlyR,   R   (   R   R   R   R   R  R  (    (   R   s%   lib/python2.7/site-packages/typing.pyR      s(    				c         @ s   t    t  r t St  d t  s/  j rE t   j   rE t S j rz t	    f d    j
   D  rz t Sn  t t   j    S(   Nu   _is_protocolc         3@ sI   |  ]? } t    |  o@ t t  |   p@ t   |  d  k	 Vq d  S(   N(   R   R[   R\   R>   (   Ry   R   (   R   R   (    s%   lib/python2.7/site-packages/typing.pys	   <genexpr>'  s   (   R   R0   R*   R\   R  RT   RU   R5   R+   R   R  R   R   RJ   (   R   R   (    (   R   R   s%   lib/python2.7/site-packages/typing.pyRJ     s    		c         C@ s   |  j  j d d   rv |  j  j d d   rv t j d  j d d k sc t j d  j d d k rg t St d	   n  |  j  j d d   r |  j r t j d  j d d k r t	 t
 |   j |  St d
   n  t	 t |   j |  S(   Nu   _is_protocolu   _is_runtime_protocoli   u   __name__u   abcu	   functoolsi   u   typinguL   Instance and class checks can only be used with @runtime_checkable protocolsu<   Protocols with non-method members don't support issubclass()(   u   abcu	   functools(   u   abcu	   functools(   R   Rz   R>   R   R   R   R*   R   R  R   R   RK   R  (   R   R   (    (    s%   lib/python2.7/site-packages/typing.pyRK   .  s    
c         C@ s   t    } x |  j d  D] } | j d k r2 q n  t | d i   } xY t | j j    t | j    D]2 } | j d  rj | d k rj | j |  qj qj Wq W| S(   Niu   Protocolu   Genericu   __annotations__u   _abc_u   __abstractmethods__u   __weakref__u   _is_protocolu   _is_runtime_protocolu   __dict__u   __args__u	   __slots__u   _get_protocol_attrsu   __next_in_mro__u   __parameters__u
   __origin__u   __orig_bases__u	   __extra__u   __tree_hash__u   __doc__u   __subclasshook__u   __init__u   __new__u
   __module__u   _MutableMapping__markeru   __metaclass__u   _gorgu   _callable_members_only(   u   Protocolu   Generic(   u   __abstractmethods__u   __annotations__u   __weakref__u   _is_protocolu   _is_runtime_protocolu   __dict__u   __args__u	   __slots__u   _get_protocol_attrsu   __next_in_mro__u   __parameters__u
   __origin__u   __orig_bases__u	   __extra__u   __tree_hash__u   __doc__u   __subclasshook__u   __init__u   __new__u
   __module__u   _MutableMapping__markeru   __metaclass__u   _gorgu   _callable_members_only(	   R   R   R   R\   R   R   t   keysR
   t   add(   R   t   attrsR   t   annotationsR   (    (    s%   lib/python2.7/site-packages/typing.pyR  ?  s"    	,       	(   R   R&   R)   R    RJ   RK   R  (    (    (    s%   lib/python2.7/site-packages/typing.pyR    s
   	+		R_   c           B@ s)   e  Z d  Z e Z d Z e Z d   Z RS(   u  Base class for protocol classes. Protocol classes are defined as::

      class Proto(Protocol):
          def meth(self):
              # type: () -> int
              pass

    Such classes are primarily used with static type checkers that recognize
    structural subtyping (static duck-typing), for example::

      class C:
          def meth(self):
              # type: () -> int
              return 0

      def func(x):
          # type: (Proto) -> int
          return x.meth()

      func(C())  # Passes static type check

    See PEP 544 for details. Protocol classes decorated with @typing.runtime_checkable
    act as simple-minded runtime protocols that checks only the presence of
    given attributes, ignoring their type signatures.

    Protocol classes can be generic, they are defined as::

      class GenProto(Protocol[T]):
          def meth(self):
              # type: () -> T
              pass
    c         O@ s4   |  j  t k r t d   n  t |  j |  | |  S(   NuI   Type Protocol cannot be instantiated; it can be used only as a base class(   R]   R_   R   R   R   (   R   R   R   (    (    s%   lib/python2.7/site-packages/typing.pyR   y  s    (    (	   R   R&   R)   R  R2   R3   R5   R+   R   (    (    (    s%   lib/python2.7/site-packages/typing.pyR_   S  s
    c         C@ s:   t  |  t  s |  j r- t d |    n  t |  _ |  S(   u   Mark a protocol class as a runtime protocol, so that it
    can be used with isinstance() and issubclass(). Raise TypeError
    if applied to a non-protocol class.

    This allows a simple-minded structural check very similar to the
    one-offs in collections.abc such as Hashable.
    uB   @runtime_checkable can be only applied to protocol classes, got %r(   R   R  R+   R   R5   t   _is_runtime_protocol(   R   (    (    s%   lib/python2.7/site-packages/typing.pyt   runtime_checkable  s
    	t   Iterablec           B@ s   e  Z d  Z e j Z RS(   (    (   R   R&   R3   R   R$  R   (    (    (    s%   lib/python2.7/site-packages/typing.pyR$    s   t   Iteratorc           B@ s   e  Z d  Z e j Z RS(   (    (   R   R&   R3   R   R%  R   (    (    (    s%   lib/python2.7/site-packages/typing.pyR%    s   t   SupportsIntc           B@ s   e  Z d Z e d     Z RS(   c         C@ s   d  S(   N(    (   R   (    (    s%   lib/python2.7/site-packages/typing.pyt   __int__  s    (    (   R   R&   R3   R   R'  (    (    (    s%   lib/python2.7/site-packages/typing.pyR&    s   t   SupportsFloatc           B@ s   e  Z d Z e d     Z RS(   c         C@ s   d  S(   N(    (   R   (    (    s%   lib/python2.7/site-packages/typing.pyt	   __float__  s    (    (   R   R&   R3   R   R)  (    (    (    s%   lib/python2.7/site-packages/typing.pyR(    s   t   SupportsComplexc           B@ s   e  Z d Z e d     Z RS(   c         C@ s   d  S(   N(    (   R   (    (    s%   lib/python2.7/site-packages/typing.pyt   __complex__  s    (    (   R   R&   R3   R   R+  (    (    (    s%   lib/python2.7/site-packages/typing.pyR*    s   t   SupportsIndexc           B@ s   e  Z d Z e d     Z RS(   c         C@ s   d  S(   N(    (   R   (    (    s%   lib/python2.7/site-packages/typing.pyt	   __index__  s    (    (   R   R&   R3   R   R-  (    (    (    s%   lib/python2.7/site-packages/typing.pyR,    s   t   SupportsAbsc           B@ s   e  Z d Z e d     Z RS(   c         C@ s   d  S(   N(    (   R   (    (    s%   lib/python2.7/site-packages/typing.pyt   __abs__  s    (    (   R   R&   R3   R   R/  (    (    (    s%   lib/python2.7/site-packages/typing.pyR.    s   t
   Reversiblec           B@ s   e  Z d  Z e j Z RS(   (    (   R   R&   R3   R   R0  R   (    (    (    s%   lib/python2.7/site-packages/typing.pyR0    s   c           B@ s   e  Z d Z e d     Z RS(   c         C@ s   d  S(   N(    (   R   (    (    s%   lib/python2.7/site-packages/typing.pyt   __reversed__  s    (    (   R   R&   R3   R   R1  (    (    (    s%   lib/python2.7/site-packages/typing.pyR0    s   t	   Containerc           B@ s   e  Z d  Z e j Z RS(   (    (   R   R&   R3   R   R2  R   (    (    (    s%   lib/python2.7/site-packages/typing.pyR2    s   t   AbstractSetc           B@ s   e  Z d  Z e j Z RS(   (    (   R   R&   R3   R   t   SetR   (    (    (    s%   lib/python2.7/site-packages/typing.pyR3    s   t
   MutableSetc           B@ s   e  Z d  Z e j Z RS(   (    (   R   R&   R3   R   R5  R   (    (    (    s%   lib/python2.7/site-packages/typing.pyR5    s   t   Mappingc           B@ s   e  Z d  Z e j Z RS(   (    (   R   R&   R3   R   R6  R   (    (    (    s%   lib/python2.7/site-packages/typing.pyR6    s   t   MutableMappingc           B@ s   e  Z d  Z e j Z RS(   (    (   R   R&   R3   R   R7  R   (    (    (    s%   lib/python2.7/site-packages/typing.pyR7    s   t   Sequencec           B@ s   e  Z d  Z e j Z RS(   (    (   R   R&   R3   R   R8  R   (    (    (    s%   lib/python2.7/site-packages/typing.pyR8    s   c           B@ s   e  Z d  Z e j Z RS(   (    (   R   R&   R3   R   R8  R   (    (    (    s%   lib/python2.7/site-packages/typing.pyR8    s   t   MutableSequencec           B@ s   e  Z d  Z e j Z RS(   (    (   R   R&   R3   R   R9  R   (    (    (    s%   lib/python2.7/site-packages/typing.pyR9    s   t
   ByteStringc           B@ s   e  Z RS(    (   R   R&   (    (    (    s%   lib/python2.7/site-packages/typing.pyR:  	  s   t   Listc           B@ s   e  Z d Z e Z d    Z RS(   c         O@ s1   |  j  t k r t d   n  t t |  | |  S(   Nu4   Type List cannot be instantiated; use list() instead(   R]   R;  R   R   R   (   R   R   R   (    (    s%   lib/python2.7/site-packages/typing.pyR     s    (    (   R   R&   R3   R   R   R   (    (    (    s%   lib/python2.7/site-packages/typing.pyR;    s   t   Dequec           B@ s    e  Z d Z e j Z d    Z RS(   c         O@ s5   |  j  t k r t j | |   St t j |  | |  S(   N(   R]   R<  t   collectionst   dequeR   (   R   R   R   (    (    s%   lib/python2.7/site-packages/typing.pyR      s    (    (   R   R&   R3   R=  R>  R   R   (    (    (    s%   lib/python2.7/site-packages/typing.pyR<    s   	R4  c           B@ s   e  Z d Z e Z d    Z RS(   c         O@ s1   |  j  t k r t d   n  t t |  | |  S(   Nu2   Type Set cannot be instantiated; use set() instead(   R]   R4  R   R   R   (   R   R   R   (    (    s%   lib/python2.7/site-packages/typing.pyR   *  s    (    (   R   R&   R3   R   R   R   (    (    (    s%   lib/python2.7/site-packages/typing.pyR4  &  s   t	   FrozenSetc           B@ s   e  Z d Z e Z d    Z RS(   c         O@ s1   |  j  t k r t d   n  t t |  | |  S(   Nu>   Type FrozenSet cannot be instantiated; use frozenset() instead(   R]   R?  R   R   R   (   R   R   R   (    (    s%   lib/python2.7/site-packages/typing.pyR   5  s    (    (   R   R&   R3   R   R   R   (    (    (    s%   lib/python2.7/site-packages/typing.pyR?  1  s   t   MappingViewc           B@ s   e  Z d  Z e j Z RS(   (    (   R   R&   R3   R   R@  R   (    (    (    s%   lib/python2.7/site-packages/typing.pyR@  <  s   t   KeysViewc           B@ s   e  Z d  Z e j Z RS(   (    (   R   R&   R3   R   RA  R   (    (    (    s%   lib/python2.7/site-packages/typing.pyRA  A  s   t	   ItemsViewc           B@ s   e  Z d  Z e j Z RS(   (    (   R   R&   R3   R   RB  R   (    (    (    s%   lib/python2.7/site-packages/typing.pyRB  F  s   t
   ValuesViewc           B@ s   e  Z d  Z e j Z RS(   (    (   R   R&   R3   R   RC  R   (    (    (    s%   lib/python2.7/site-packages/typing.pyRC  M  s   t   ContextManagerc           B@ s8   e  Z d Z d    Z e j d    Z e d    Z RS(   c         C@ s   |  S(   N(    (   R   (    (    s%   lib/python2.7/site-packages/typing.pyt	   __enter__U  s    c         C@ s   d  S(   N(   R>   (   R   t   exc_typet	   exc_valuet	   traceback(    (    s%   lib/python2.7/site-packages/typing.pyt   __exit__X  s    c         C@ sI   |  t  k rE t d   | j D  rE t d   | j D  rE t Sn  t S(   Nc         s@ s   |  ] } d  | j  k Vq d S(   u	   __enter__N(   R   (   Ry   t   B(    (    s%   lib/python2.7/site-packages/typing.pys	   <genexpr>d  s    c         s@ s   |  ] } d  | j  k Vq d S(   u   __exit__N(   R   (   Ry   RJ  (    (    s%   lib/python2.7/site-packages/typing.pys	   <genexpr>e  s    (   RD  R   R   R5   RD   (   R   t   C(    (    s%   lib/python2.7/site-packages/typing.pyR   \  s
    (    (	   R   R&   R3   RE  R   R   RI  R,   R   (    (    (    s%   lib/python2.7/site-packages/typing.pyRD  R  s   	t   Dictc           B@ s   e  Z d Z e Z d    Z RS(   c         O@ s1   |  j  t k r t d   n  t t |  | |  S(   Nu4   Type Dict cannot be instantiated; use dict() instead(   R]   RL  R   R   R   (   R   R   R   (    (    s%   lib/python2.7/site-packages/typing.pyR   n  s    (    (   R   R&   R3   R   R   R   (    (    (    s%   lib/python2.7/site-packages/typing.pyRL  j  s   t   DefaultDictc           B@ s    e  Z d Z e j Z d    Z RS(   c         O@ s5   |  j  t k r t j | |   St t j |  | |  S(   N(   R]   RM  R=  t   defaultdictR   (   R   R   R   (    (    s%   lib/python2.7/site-packages/typing.pyR   y  s    (    (   R   R&   R3   R=  RN  R   R   (    (    (    s%   lib/python2.7/site-packages/typing.pyRM  u  s   	t   Counterc           B@ s    e  Z d Z e j Z d    Z RS(   c         O@ s5   |  j  t k r t j | |   St t j |  | |  S(   N(   R]   RO  R=  R   (   R   R   R   (    (    s%   lib/python2.7/site-packages/typing.pyR     s    (    (   R   R&   R3   R=  RO  R   R   (    (    (    s%   lib/python2.7/site-packages/typing.pyRO    s   	t	   Generatorc           B@ s   e  Z d Z e Z d    Z RS(   c         O@ s1   |  j  t k r t d   n  t t |  | |  S(   Nu@   Type Generator cannot be instantiated; create a subclass instead(   R]   RP  R   R   t   _G_base(   R   R   R   (    (    s%   lib/python2.7/site-packages/typing.pyR     s    (    (   R   R&   R3   RQ  R   R   (    (    (    s%   lib/python2.7/site-packages/typing.pyRP    s   u   CT_coR   t   Typec           B@ s   e  Z d  Z d Z e Z RS(   u  A special construct usable to annotate class objects.

    For example, suppose we have the following classes::

      class User: ...  # Abstract base for User classes
      class BasicUser(User): ...
      class ProUser(User): ...
      class TeamUser(User): ...

    And a function that takes a class argument that's a subclass of
    User and returns an instance of the corresponding class::

      U = TypeVar('U', bound=User)
      def new_user(user_class: Type[U]) -> U:
          user = user_class()
          # (Here we could write the user object to a database)
          return user

      joe = new_user(BasicUser)

    At this point the type checker knows that joe has type BasicUser.
    (    (   R   R&   R)   R3   R0   R   (    (    (    s%   lib/python2.7/site-packages/typing.pyRR    s   c         C@ s   g  | D] \ } } | | f ^ q } t  j |  g  | D] \ } } | ^ q5  } t |  | _ y% t j d  j j d d  | _ Wn t	 t
 f k
 r n X| S(   u  Typed version of namedtuple.

    Usage::

        Employee = typing.NamedTuple('Employee', [('name', str), ('id', int)])

    This is equivalent to::

        Employee = collections.namedtuple('Employee', ['name', 'id'])

    The resulting class has one extra attribute: _field_types,
    giving a dict mapping field names to types.  (The field names
    are in the _fields attribute, which is part of the namedtuple
    API.)
    i   u   __name__u   __main__(   R=  t
   namedtupleR   t   _field_typesR   R   R   Rz   R&   R   R{   (   t   typenamet   fieldst   nRY   R   (    (    s%   lib/python2.7/site-packages/typing.pyt
   NamedTuple  s    %+%c         C@ sM   y/ t  j d  j d d k r. t d   n  Wn t t f k
 rH n Xt S(   Ni   u   __name__u   abcu	   functoolsu   typingu4   TypedDict does not support instance and class checks(   u   abcu	   functoolsu   typing(   R   R   R   R   R   R{   R*   (   R   RE   (    (    s%   lib/python2.7/site-packages/typing.pyt   _check_fails  s    c         O@ s   t  | |   S(   N(   R   (   R   R   R   (    (    s%   lib/python2.7/site-packages/typing.pyt	   _dict_new  s    c         K@ s   | j  d t  } | d  k r' | } n | r< t d   n  i t |  d 6| d 6} y& t j d  j j d d  | d <Wn t	 t
 f k
 r n Xt | d	 |  S(
   Nu   totalu@   TypedDict takes either a dict or keyword arguments, but not bothu   __annotations__u	   __total__i   u   __name__u   __main__u
   __module__(    (   R  R5   R>   R   R   R   R   R   Rz   R   R{   t   _TypedDictMeta(   R   t	   _typenamet   _fieldsR   t   totalt   ns(    (    s%   lib/python2.7/site-packages/typing.pyt   _typeddict_new  s    	&R[  c           B@ s   e  Z e d   Z e Z Z RS(   c         @ s   | d k r t  n t | d <t t |   j |  | t f |  } | j d i   } d     f d   | j   D } x* | D]" } | j | j	 j d i    q{ W| | _
 t | d  s | | _ n  | S(   Nt	   TypedDictu   __new__u   __annotations__u?   TypedDict('Name', {f0: t0, f1: t1, ...}); each t must be a typec         @ s(   i  |  ] \ } } t  |    |  q S(    (   RB   (   Ry   RW  Rf   (   R`   (    s%   lib/python2.7/site-packages/typing.pys
   <dictcomp>	  s   	 u	   __total__(   R`  RZ  R   R[  R   R   Rz   R  R   R   t   __annotations__R   t	   __total__(   R   R   R   R_  R^  t   tp_dictt   annsR   (    (   R`   s%   lib/python2.7/site-packages/typing.pyR     s    $ 	(   R   R&   R5   R   RY  RJ   RK   (    (    (    s%   lib/python2.7/site-packages/typing.pyR[    s   Ra  u=  A simple typed name space. At runtime it is equivalent to a plain dict.

    TypedDict creates a dictionary type that expects all of its
    instances to have a certain set of keys, with each key
    associated with a value of a consistent type. This expectation
    is not checked at runtime but is only enforced by type checkers.
    Usage::

        Point2D = TypedDict('Point2D', {'x': int, 'y': int, 'label': str})

        a: Point2D = {'x': 1, 'y': 2, 'label': 'good'}  # OK
        b: Point2D = {'z': 3, 'label': 'bad'}           # Fails type check

        assert Point2D(x=1, y=2, label='first') == dict(x=1, y=2, label='first')

    The type info could be accessed via Point2D.__annotations__. TypedDict
    supports an additional equivalent form::

        Point2D = TypedDict('Point2D', x=int, y=int, label=str)
    c         C@ s%   d   } t  |   | _ | | _ | S(   u:  NewType creates simple unique types with almost zero
    runtime overhead. NewType(name, tp) is considered a subtype of tp
    by static type checkers. At runtime, NewType(name, tp) returns
    a dummy function that simply returns its argument. Usage::

        UserId = NewType('UserId', int)

        def name_by_id(user_id):
            # type: (UserId) -> str
            ...

        UserId('user')          # Fails type check

        name_by_id(42)          # Fails type check
        name_by_id(UserId(42))  # OK

        num = UserId(5) + 1     # type: int
    c         S@ s   |  S(   N(    (   R   (    (    s%   lib/python2.7/site-packages/typing.pyt   new_type=	  s    (   R   R   t   __supertype__(   R   Rf   Rf  (    (    s%   lib/python2.7/site-packages/typing.pyt   NewType)	  s    		t   IOc           B@ sO  e  Z d  Z d Z e d    Z e d    Z e d    Z e d    Z	 e d    Z
 e d    Z e d    Z e d d	   Z e d
    Z e d d   Z e d d   Z e d d   Z e d    Z e d    Z e d d   Z e d    Z e d    Z e d    Z e d    Z e d    Z RS(   u  Generic base class for TextIO and BinaryIO.

    This is an abstract, generic version of the return of open().

    NOTE: This does not distinguish between the different possible
    classes (text vs. binary, read vs. write vs. read/write,
    append-only, unbuffered).  The TextIO and BinaryIO subclasses
    below capture the distinctions between text vs. binary, which is
    pervasive in the interface; however we currently do not offer a
    way to track the other distinctions in the type system.
    c         C@ s   d  S(   N(    (   R   (    (    s%   lib/python2.7/site-packages/typing.pyt   mode]	  s    c         C@ s   d  S(   N(    (   R   (    (    s%   lib/python2.7/site-packages/typing.pyR   a	  s    c         C@ s   d  S(   N(    (   R   (    (    s%   lib/python2.7/site-packages/typing.pyt   closee	  s    c         C@ s   d  S(   N(    (   R   (    (    s%   lib/python2.7/site-packages/typing.pyt   closedi	  s    c         C@ s   d  S(   N(    (   R   (    (    s%   lib/python2.7/site-packages/typing.pyt   filenom	  s    c         C@ s   d  S(   N(    (   R   (    (    s%   lib/python2.7/site-packages/typing.pyt   flushq	  s    c         C@ s   d  S(   N(    (   R   (    (    s%   lib/python2.7/site-packages/typing.pyt   isattyu	  s    ic         C@ s   d  S(   N(    (   R   RW  (    (    s%   lib/python2.7/site-packages/typing.pyt   ready	  s    c         C@ s   d  S(   N(    (   R   (    (    s%   lib/python2.7/site-packages/typing.pyt   readable}	  s    c         C@ s   d  S(   N(    (   R   t   limit(    (    s%   lib/python2.7/site-packages/typing.pyt   readline	  s    c         C@ s   d  S(   N(    (   R   t   hint(    (    s%   lib/python2.7/site-packages/typing.pyt	   readlines	  s    i    c         C@ s   d  S(   N(    (   R   t   offsett   whence(    (    s%   lib/python2.7/site-packages/typing.pyt   seek	  s    c         C@ s   d  S(   N(    (   R   (    (    s%   lib/python2.7/site-packages/typing.pyt   seekable	  s    c         C@ s   d  S(   N(    (   R   (    (    s%   lib/python2.7/site-packages/typing.pyt   tell	  s    c         C@ s   d  S(   N(    (   R   t   size(    (    s%   lib/python2.7/site-packages/typing.pyt   truncate	  s    c         C@ s   d  S(   N(    (   R   (    (    s%   lib/python2.7/site-packages/typing.pyt   writable	  s    c         C@ s   d  S(   N(    (   R   t   s(    (    s%   lib/python2.7/site-packages/typing.pyt   write	  s    c         C@ s   d  S(   N(    (   R   t   lines(    (    s%   lib/python2.7/site-packages/typing.pyt
   writelines	  s    c         C@ s   d  S(   N(    (   R   (    (    s%   lib/python2.7/site-packages/typing.pyRE  	  s    c         C@ s   d  S(   N(    (   R   R0   R   RH  (    (    s%   lib/python2.7/site-packages/typing.pyRI  	  s    (    N(   R   R&   R)   R3   R   Rj  R   R   Rk  Rl  Rm  Rn  Ro  Rp  Rq  Rs  Ru  Rx  Ry  Rz  R>   R|  R}  R  R  RE  RI  (    (    (    s%   lib/python2.7/site-packages/typing.pyRi  N	  s6   t   BinaryIOc           B@ s2   e  Z d  Z d Z e d    Z e d    Z RS(   u5   Typed version of the return of open() in binary mode.c         C@ s   d  S(   N(    (   R   R~  (    (    s%   lib/python2.7/site-packages/typing.pyR  	  s    c         C@ s   d  S(   N(    (   R   (    (    s%   lib/python2.7/site-packages/typing.pyRE  	  s    (    (   R   R&   R)   R3   R   R  RE  (    (    (    s%   lib/python2.7/site-packages/typing.pyR  	  s   t   TextIOc           B@ sn   e  Z d  Z d Z e d    Z e d    Z e d    Z e d    Z e d    Z	 e
 d    Z RS(   u3   Typed version of the return of open() in text mode.c         C@ s   d  S(   N(    (   R   (    (    s%   lib/python2.7/site-packages/typing.pyt   buffer	  s    c         C@ s   d  S(   N(    (   R   (    (    s%   lib/python2.7/site-packages/typing.pyt   encoding	  s    c         C@ s   d  S(   N(    (   R   (    (    s%   lib/python2.7/site-packages/typing.pyt   errors	  s    c         C@ s   d  S(   N(    (   R   (    (    s%   lib/python2.7/site-packages/typing.pyt   line_buffering	  s    c         C@ s   d  S(   N(    (   R   (    (    s%   lib/python2.7/site-packages/typing.pyt   newlines	  s    c         C@ s   d  S(   N(    (   R   (    (    s%   lib/python2.7/site-packages/typing.pyRE  	  s    (    (   R   R&   R)   R3   R   R  R  R  R  R  R   RE  (    (    (    s%   lib/python2.7/site-packages/typing.pyR  	  s   t   ioc           B@ s/   e  Z d  Z d d d g Z e Z e Z e Z RS(   u)   Wrapper namespace for IO generic classes.u   IOu   TextIOu   BinaryIO(   R   R&   R)   t   __all__Ri  R  R  (    (    (    s%   lib/python2.7/site-packages/typing.pyR  	  s
   s   .iou   Patternu    c         C@ s   |  j  S(   N(   t   pattern(   R   (    (    s%   lib/python2.7/site-packages/typing.pyt   <lambda>	  t    u   Matchc         C@ s
   |  j  j S(   N(   t   reR  (   t   m(    (    s%   lib/python2.7/site-packages/typing.pyR  	  R  R  c           B@ s&   e  Z d  Z d d g Z e Z e Z RS(   u&   Wrapper namespace for re type aliases.u   Patternu   Match(   R   R&   R)   R  t   Patternt   Match(    (    (    s%   lib/python2.7/site-packages/typing.pyR  	  s   s   .re(   t
   __future__R    R   R   R   R   R=  R   R  t	   stdlib_reR   RX   R  t   collections.abcR   t   ImportErrorR  R	   R   R0   R   R   R-   R4   R7   RL   R%   RZ   R#   RB   R   Rc   Rd   R5   t   ClassVarRk   Rl   t   FinalRo   Rp   Rq   t   LiteralRt   Ru   t   AnyRv   Rw   t   NoReturnRx   RR   t   Tt   KTt   VTt   T_cot   V_cot   VT_cot   T_contrat   bytest   unicodet   AnyStrR   R>   R   R   R   R   R   R   R   R   R   R   t   OptionalR   R   R   R   R   t   _copy_dispatchR^   R   R   R   R   R/   R   R   R   R   R
  R  R  R  R  R  R  R  R_   R#  t   HashableR$  R%  R&  R(  R*  R,  R.  R   R0  t   SizedR2  R3  R5  R6  R7  R8  R9  t   intR:  t   registerR   t	   bytearrayR   R;  R>  R<  R   R4  R   R?  R@  RA  RB  RC  RD  R   RL  RN  RM  RO  RP  RQ  t   GeneratorTypet   CT_coRR  RX  RY  RZ  R`  R[  Ra  R   R&   R)   Rh  t   TextR*   t   TYPE_CHECKINGRi  R  R  R  t   modulesR9   R  t   matchR  (    (    (    s%   lib/python2.7/site-packages/typing.pyt   <module>   s  			)%5C						5	6		2		Y	!	)				 		"9								i-			$1 '$ 
!#&
&	*		
				`	