HEX
Server: Apache
System: Linux p102.lithium.hosting 4.18.0-553.141.1.el8_10.x86_64 #1 SMP Fri Jul 10 17:48:02 UTC 2026 x86_64
User: bvzmoamr (9955)
PHP: 8.1.34
Disabled: syslog
Upload Files
File: //usr/lib64/python2.7/site-packages/mercurial/thirdparty/attr/_make.pyo
�
1�3\c@`sddlmZmZmZddlZddlZddlmZddlm	Z	ddl
mZmZm
Z
mZmZddlmZmZmZejZdZd	Zd
Zei�Zdefd��YZe�Zedeededid
�Zd�Z d�Z!d�Z"d�Z#dddeedee$e$e$d�
Z%er\d�Z&n	d�Z&d�Z'dd�Z(dd�Z)ddd�Z*d�Z+d�Z,d�Z-d�Z.d�Z/defd��YZ0ge0j1D]?Z2e0d e2d!ed"dd#ed$ed%e2d&kd'e�^q�Z3e(e)e*e0d(e3�d(e3�d(ge3D]Z4e4j5rOe4^qO�Z0d)efd*��YZ6e)e*e6��Z6e%d+ed'e$�d,efd-��Y�Z7efd.�Z8e%d+ed%e�d/efd0��Y�Z9d1�Z:dS(2i(tabsolute_importtdivisiontprint_functionN(t
itemgetteri(t_config(tPY2t	iteritemstisclasstiterkeystmetadata_proxy(tDefaultAlreadySetErrortFrozenInstanceErrortNotAnAttrsClassErrors__attr_convert_{}s__attr_factory_{}s/    {attr_name} = property(itemgetter({index}))t_NothingcB`sDeZdZd�Zd�Zd�Zd�Zd�Zd�ZRS(s�
    Sentinel class to indicate the lack of a value when ``None`` is ambiguous.

    All instances of `_Nothing` are equal.
    cC`s|S(N((tself((sE/usr/lib64/python2.7/site-packages/mercurial/thirdparty/attr/_make.pyt__copy__scC`s|S(N((Rt_((sE/usr/lib64/python2.7/site-packages/mercurial/thirdparty/attr/_make.pyt__deepcopy__"scC`s
|jtkS(N(t	__class__R
(Rtother((sE/usr/lib64/python2.7/site-packages/mercurial/thirdparty/attr/_make.pyt__eq__%scC`s||kS(N((RR((sE/usr/lib64/python2.7/site-packages/mercurial/thirdparty/attr/_make.pyt__ne__(scC`sdS(NtNOTHING((R((sE/usr/lib64/python2.7/site-packages/mercurial/thirdparty/attr/_make.pyt__repr__+scC`sdS(NIᆳ�((R((sE/usr/lib64/python2.7/site-packages/mercurial/thirdparty/attr/_make.pyt__hash__.s(	t__name__t
__module__t__doc__RRRRRR(((sE/usr/lib64/python2.7/site-packages/mercurial/thirdparty/attr/_make.pyR
s					cC`sj|d
k	r3|tk	r3|tk	r3td��ntd|d|d|d|d|d|d|d	|�S(s�
    Create a new attribute on a class.

    ..  warning::

        Does *not* do anything unless the class is also decorated with
        :func:`attr.s`!

    :param default: A value that is used if an ``attrs``-generated ``__init__``
        is used and no value is passed while instantiating or the attribute is
        excluded using ``init=False``.

        If the value is an instance of :class:`Factory`, its callable will be
        used to construct a new value (useful for mutable datatypes like lists
        or dicts).

        If a default is not set (or set manually to ``attr.NOTHING``), a value
        *must* be supplied when instantiating; otherwise a :exc:`TypeError`
        will be raised.

        The default can also be set using decorator notation as shown below.

    :type default: Any value.

    :param validator: :func:`callable` that is called by ``attrs``-generated
        ``__init__`` methods after the instance has been initialized.  They
        receive the initialized instance, the :class:`Attribute`, and the
        passed value.

        The return value is *not* inspected so the validator has to throw an
        exception itself.

        If a ``list`` is passed, its items are treated as validators and must
        all pass.

        Validators can be globally disabled and re-enabled using
        :func:`get_run_validators`.

        The validator can also be set using decorator notation as shown below.

    :type validator: ``callable`` or a ``list`` of ``callable``\ s.

    :param bool repr: Include this attribute in the generated ``__repr__``
        method.
    :param bool cmp: Include this attribute in the generated comparison methods
        (``__eq__`` et al).
    :param hash: Include this attribute in the generated ``__hash__``
        method.  If ``None`` (default), mirror *cmp*'s value.  This is the
        correct behavior according the Python spec.  Setting this value to
        anything else than ``None`` is *discouraged*.
    :type hash: ``bool`` or ``None``
    :param bool init: Include this attribute in the generated ``__init__``
        method.  It is possible to set this to ``False`` and set a default
        value.  In that case this attributed is unconditionally initialized
        with the specified default value or factory.
    :param callable convert: :func:`callable` that is called by
        ``attrs``-generated ``__init__`` methods to convert attribute's value
        to the desired format.  It is given the passed-in value, and the
        returned value will be used as the new value of the attribute.  The
        value is converted before being passed to the validator, if any.
    :param metadata: An arbitrary mapping, to be used by third-party
        components.  See :ref:`extending_metadata`.

    ..  versionchanged:: 17.1.0 *validator* can be a ``list`` now.
    ..  versionchanged:: 17.1.0
        *hash* is ``None`` and therefore mirrors *cmp* by default .
    s6Invalid value for hash.  Must be True, False, or None.tdefaultt	validatortreprtcmpthashtinittconverttmetadataN(tNonetTruetFalset	TypeErrort
_CountingAttr(RRRRR R!R"R#((sE/usr/lib64/python2.7/site-packages/mercurial/thirdparty/attr/_make.pytattr8sF$cC`s�dj|�}dj|�dg}|rixIt|�D]+\}}|jtjd|d|��q7Wn
|jd�itd6}ttdj|�d	d
�|�||S(s�
    Create a tuple subclass to hold `Attribute`s for an `attrs` class.

    The subclass is a bare tuple with properties for names.

    class MyClassAttributes(tuple):
        __slots__ = ()
        x = property(itemgetter(0))
    s{}Attributessclass {}(tuple):s    __slots__ = ()tindext	attr_names    passRs
ttexec(tformatt	enumeratetappendt_tuple_property_patRtevaltcompiletjoin(tcls_namet
attr_namestattr_class_nametattr_class_templatetiR+tglobs((sE/usr/lib64/python2.7/site-packages/mercurial/thirdparty/attr/_make.pyt_make_attr_tuple_class�s
	

"c	`s_g�x\t|jdd!�D]D}t|dd�}|dk	r�j�fd�|D��qqW|dkr�g|jj�D]'\}}t|t�r�||f^q�}n+gt	|�D]\}}||f^q�}gt
|dd��D]$\}}tjd|d|�^q�}	g�|	D]}
|
j
^q'}t|j|�}|�gt
|dd	��D]$\}}tjd|d|�^qj�|_t}
x�|jD]�}
|dkr�|
�kr�t||
j
|
�n|
tkr$|
jtkr$|
jtkr$td
jd|
���q�|
tkr�|
jtk	r�|
jtk	r�t}
q�q�WdS(
s�
    Transforms all `_CountingAttr`s on a class into `Attribute`s and saves the
    list in `__attrs_attrs__`.

    If *these* is passed, use that and don't look for them on the class.
    ii����t__attrs_attrs__c3`s!|]}|�kr|VqdS(N((t.0ta(t	super_cls(sE/usr/lib64/python2.7/site-packages/mercurial/thirdparty/attr/_make.pys	<genexpr>�stkeycS`s|djS(Ni(tcounter(te((sE/usr/lib64/python2.7/site-packages/mercurial/thirdparty/attr/_make.pyt<lambda>�R,tnametcacS`s|djS(Ni(RA(RB((sE/usr/lib64/python2.7/site-packages/mercurial/thirdparty/attr/_make.pyRC�R,sqNo mandatory attributes allowed after an attribute with a default value or factory.  Attribute in question: {a!r}R>N(treversedt__mro__tgetattrR$textendt__dict__titemst
isinstanceR(Rtsortedt	Attributetfrom_counting_attrRDR;RR<R&tsetattrR%RRR!t
ValueErrorR.(tclstthesetct	sub_attrsRDR)tca_listRER+tnon_super_attrsR>R6t
AttrsClassthad_default((R?sE/usr/lib64/python2.7/site-packages/mercurial/thirdparty/attr/_make.pyt_transform_attrs�s<$$(= D*	cC`s
t��dS(s4
    Attached to frozen classes as __setattr__.
    N(R(RRDtvalue((sE/usr/lib64/python2.7/site-packages/mercurial/thirdparty/attr/_make.pyt_frozen_setattrs�scC`s
t��dS(s4
    Attached to frozen classes as __delattr__.
    N(R(RRD((sE/usr/lib64/python2.7/site-packages/mercurial/thirdparty/attr/_make.pyt_frozen_delattrs�sc
	`sE���������f	d�}
|dkr7|
S|
|�SdS(s�
    A class decorator that adds `dunder
    <https://wiki.python.org/moin/DunderAlias>`_\ -methods according to the
    specified attributes using :func:`attr.ib` or the *these* argument.

    :param these: A dictionary of name to :func:`attr.ib` mappings.  This is
        useful to avoid the definition of your attributes within the class body
        because you can't (e.g. if you want to add ``__repr__`` methods to
        Django models) or don't want to.

        If *these* is not ``None``, ``attrs`` will *not* search the class body
        for attributes.

    :type these: :class:`dict` of :class:`str` to :func:`attr.ib`

    :param str repr_ns: When using nested classes, there's no way in Python 2
        to automatically detect that.  Therefore it's possible to set the
        namespace explicitly for a more meaningful ``repr`` output.
    :param bool repr: Create a ``__repr__`` method with a human readable
        represantation of ``attrs`` attributes..
    :param bool str: Create a ``__str__`` method that is identical to
        ``__repr__``.  This is usually not necessary except for
        :class:`Exception`\ s.
    :param bool cmp: Create ``__eq__``, ``__ne__``, ``__lt__``, ``__le__``,
        ``__gt__``, and ``__ge__`` methods that compare the class as if it were
        a tuple of its ``attrs`` attributes.  But the attributes are *only*
        compared, if the type of both classes is *identical*!
    :param hash: If ``None`` (default), the ``__hash__`` method is generated
        according how *cmp* and *frozen* are set.

        1. If *both* are True, ``attrs`` will generate a ``__hash__`` for you.
        2. If *cmp* is True and *frozen* is False, ``__hash__`` will be set to
           None, marking it unhashable (which it is).
        3. If *cmp* is False, ``__hash__`` will be left untouched meaning the
           ``__hash__`` method of the superclass will be used (if superclass is
           ``object``, this means it will fall back to id-based hashing.).

        Although not recommended, you can decide for yourself and force
        ``attrs`` to create one (e.g. if the class is immutable even though you
        didn't freeze it programmatically) by passing ``True`` or not.  Both of
        these cases are rather special and should be used carefully.

        See the `Python documentation \
        <https://docs.python.org/3/reference/datamodel.html#object.__hash__>`_
        and the `GitHub issue that led to the default behavior \
        <https://github.com/python-attrs/attrs/issues/136>`_ for more details.
    :type hash: ``bool`` or ``None``
    :param bool init: Create a ``__init__`` method that initialiazes the
        ``attrs`` attributes.  Leading underscores are stripped for the
        argument name.  If a ``__attrs_post_init__`` method exists on the
        class, it will be called after the class is fully initialized.
    :param bool slots: Create a slots_-style class that's more
        memory-efficient.  See :ref:`slots` for further ramifications.
    :param bool frozen: Make instances immutable after initialization.  If
        someone attempts to modify a frozen instance,
        :exc:`attr.exceptions.FrozenInstanceError` is raised.

        Please note:

            1. This is achieved by installing a custom ``__setattr__`` method
               on your class so you can't implement an own one.

            2. True immutability is impossible in Python.

            3. This *does* have a minor a runtime performance :ref:`impact
               <how-frozen>` when initializing new instances.  In other words:
               ``__init__`` is slightly slower with ``frozen=True``.

            4. If a class is frozen, you cannot modify ``self`` in
               ``__attrs_post_init__`` or a self-written ``__init__``. You can
               circumvent that limitation by using
               ``object.__setattr__(self, "attribute_name", value)``.

        ..  _slots: https://docs.python.org/3.5/reference/datamodel.html#slots

    ..  versionadded:: 16.0.0 *slots*
    ..  versionadded:: 16.1.0 *frozen*
    ..  versionadded:: 16.3.0 *str*, and support for ``__attrs_post_init__``.
    ..  versionchanged::
            17.1.0 *hash* supports ``None`` as value which is also the default
            now.
    c`s�t|dd�dkr'td��n�tkrN�tkrNtd��n�r��dkr�g|jj�D]!\}}t|t	�rp|^qp}q�t
t���}nt|��t
|�p��}�tkr�t|d��}n�tkr
|j|_n�tkr%t|�}n�tk	rX�tk	rX�dk	rXtd��no�tks��dkr�tkrnH�tks��dkr��tkr��tkr�t|�}n	d|_�tkr�t||�}n|tkr!t|_t|_�tkr!t|�}q!n�tkr�t|j�}t|�|d<x|D]}|j|d�qSW|jdd�t|dd�}t|�|j|j|�}|dk	r�||_ q�n|S(	NRs(attrs only works with new-style classes.s3__str__ can only be generated if a __repr__ exists.tnss6Invalid value for hash.  Must be True, False, or None.t	__slots__RJt__qualname__(!RHR$R'R&R%RQRJRKRLR(tlistRRZt_has_frozen_superclasst	_add_reprRt__str__t_add_cmpt	_add_hashRt	_add_initR\t__setattr__R]t__delattr__t_add_pickletdictttupletpopttypeRt	__bases__R`(RRRDR)RVteffectively_frozentcls_dicttca_nametqualname(	RtfrozenR R!Rtrepr_nstslotststrRS(sE/usr/lib64/python2.7/site-packages/mercurial/thirdparty/attr/_make.pytwrapBsZ
$$0			
N(R$(t	maybe_clsRSRuRRR R!RvRtRwRx((	RRtR R!RRuRvRwRSsE/usr/lib64/python2.7/site-packages/mercurial/thirdparty/attr/_make.pyt
attributes�sU'BcC`s1t|jdd�tjko0|jjtjkS(sb
        Check whether *cls* has a frozen ancestor by looking at its
        __setattr__.
        RN(RHRhR$R\RR(RR((sE/usr/lib64/python2.7/site-packages/mercurial/thirdparty/attr/_make.pyRb�scC`s
|jtkS(sb
        Check whether *cls* has a frozen ancestor by looking at its
        __setattr__.
        (RhR\(RR((sE/usr/lib64/python2.7/site-packages/mercurial/thirdparty/attr/_make.pyRb�sc`st�fd�|D��S(s:
    Create a tuple of all values of *obj*'s *attrs*.
    c3`s!|]}t�|j�VqdS(N(RHRD(R=R>(tobj(sE/usr/lib64/python2.7/site-packages/mercurial/thirdparty/attr/_make.pys	<genexpr>�s(Rl(R{tattrs((R{sE/usr/lib64/python2.7/site-packages/mercurial/thirdparty/attr/_make.pyt_attrs_to_tuple�sc`st�dkrXg|jD]9}|jtksI|jdkr|jtkr|^q�n�fd�}||_|S(s%
    Add a hash method to *cls*.
    c`stt|���S(s1
        Automatically created by attrs.
        (R R}(R(R|(sE/usr/lib64/python2.7/site-packages/mercurial/thirdparty/attr/_make.pythash_�sN(R$R<R R%RR(RRR|R>R~((R|sE/usr/lib64/python2.7/site-packages/mercurial/thirdparty/attr/_make.pyRf�s
<	c`s��dkr4g|jD]}|jr|^q�n�fd���fd���fd�}�fd�}�fd�}�fd�}�fd�}�|_||_||_||_||_||_|S(	s*
    Add comparison methods to *cls*.
    c`s
t|��S(s&
        Save us some typing.
        (R}(R{(R|(sE/usr/lib64/python2.7/site-packages/mercurial/thirdparty/attr/_make.pytattrs_to_tuple�sc`s0|j|jkr(�|��|�kStSdS(s1
        Automatically created by attrs.
        N(RtNotImplemented(RR(R(sE/usr/lib64/python2.7/site-packages/mercurial/thirdparty/attr/_make.pyteq�sc`s(�||�}|tkrtS|SdS(s1
        Automatically created by attrs.
        N(R�(RRtresult(R�(sE/usr/lib64/python2.7/site-packages/mercurial/thirdparty/attr/_make.pytne�sc`s0t||j�r(�|��|�kStSdS(s1
        Automatically created by attrs.
        N(RLRR�(RR(R(sE/usr/lib64/python2.7/site-packages/mercurial/thirdparty/attr/_make.pytlt�sc`s0t||j�r(�|��|�kStSdS(s1
        Automatically created by attrs.
        N(RLRR�(RR(R(sE/usr/lib64/python2.7/site-packages/mercurial/thirdparty/attr/_make.pytle�sc`s0t||j�r(�|��|�kStSdS(s1
        Automatically created by attrs.
        N(RLRR�(RR(R(sE/usr/lib64/python2.7/site-packages/mercurial/thirdparty/attr/_make.pytgt�sc`s0t||j�r(�|��|�kStSdS(s1
        Automatically created by attrs.
        N(RLRR�(RR(R(sE/usr/lib64/python2.7/site-packages/mercurial/thirdparty/attr/_make.pytge�sN(	R$R<RRRt__lt__t__le__t__gt__t__ge__(RRR|R>R�R�R�R�R�((R|RR�sE/usr/lib64/python2.7/site-packages/mercurial/thirdparty/attr/_make.pyRe�s (	
										c`sS�dkr4g|jD]}|jr|^q�n��fd�}||_|S(s%
    Add a repr method to *cls*.
    c`s��j}�d	krXt|dd	�}|d	k	rL|jdd�d}qi|j}n�d|j}dj|dj�fd��D���S(
s1
        Automatically created by attrs.
        R`s>.ii����t.s{0}({1})s, c3`s2|](}|jdtt�|j��VqdS(t=N(RDRRH(R=R>(R(sE/usr/lib64/python2.7/site-packages/mercurial/thirdparty/attr/_make.pys	<genexpr>sN(RR$RHtrsplitRR.R4(Rtreal_clsRst
class_name(R|R^(RsE/usr/lib64/python2.7/site-packages/mercurial/thirdparty/attr/_make.pytrepr_s	N(R$R<RR(RRR^R|R>R�((R|R^sE/usr/lib64/python2.7/site-packages/mercurial/thirdparty/attr/_make.pyRcs
(	cC`sFg|jD]$}|js(|jtk	r
|^q
}tj�}|jt|�jd��dj	|j
��}t||t|dt
��\}}i}t||d�}	td�|D��}
|jitd6|
d6�|tkr�t|d<nt|	||�|d	}t|�d
|jt�|ftj|<||_|S(sR
    Add a __init__ method to *cls*.  If *frozen* is True, make it immutable.
    sutf-8s<attrs generated init {0}>t__attrs_post_init__R-cs`s|]}|j|fVqdS(N(RD(R=R>((sE/usr/lib64/python2.7/site-packages/mercurial/thirdparty/attr/_make.pys	<genexpr>:sRt	attr_dictt_cached_setattrt__init__N(R<R!RRthashlibtsha1tupdateRtencodeR.t	hexdigestt_attrs_to_scriptRHR&R3RkR%t_obj_setattrR2tlenR$t
splitlinest	linecachetcacheR�(RRRtR>R|R�tunique_filenametscriptR:tlocstbytecodeR�R!((sE/usr/lib64/python2.7/site-packages/mercurial/thirdparty/attr/_make.pyRg%s4$	

		cC`s(d�}d�}||_||_|S(sC
    Add pickle helpers, needed for frozen and slotted classes
    c`s#t�fd�t�j�D��S(s(
        Play nice with pickle.
        c3`s!|]}t�|j�VqdS(N(RHRD(R=R>(R{(sE/usr/lib64/python2.7/site-packages/mercurial/thirdparty/attr/_make.pys	<genexpr>Zs(RltfieldsR(R{((R{sE/usr/lib64/python2.7/site-packages/mercurial/thirdparty/attr/_make.pyt_slots_getstate__VscS`sOtj|t�}x6tt|j�|�D]\}}||j|�q+WdS(s(
        Play nice with pickle.
        N(R�t__get__RNtzipR�RRD(R{tstatet__bound_setattrR>R[((sE/usr/lib64/python2.7/site-packages/mercurial/thirdparty/attr/_make.pyt_slots_setstate__\s%(t__getstate__t__setstate__(RRR�R�((sE/usr/lib64/python2.7/site-packages/mercurial/thirdparty/attr/_make.pyRjRs
				cC`sXt|�std��nt|dd�}|dkrTtdjd|���n|S(s�
    Returns the tuple of ``attrs`` attributes for a class.

    The tuple also allows accessing the fields by their names (see below for
    examples).

    :param type cls: Class to introspect.

    :raise TypeError: If *cls* is not a class.
    :raise attr.exceptions.NotAnAttrsClassError: If *cls* is not an ``attrs``
        class.

    :rtype: tuple (with name accesors) of :class:`attr.Attribute`

    ..  versionchanged:: 16.2.0 Returned tuple allows accessing the fields
        by name.
    sPassed object must be a class.R<s({cls!r} is not an attrs-decorated class.RRN(RR'RHR$RR.(RRR|((sE/usr/lib64/python2.7/site-packages/mercurial/thirdparty/attr/_make.pyR�iscC`setjtkrdSxKt|j�D]:}|j}|dk	r#|||t||j��q#q#WdS(s�
    Validate all attributes on *inst* that have a validator.

    Leaves all exceptions through.

    :param inst: Instance of a class with ``attrs`` attributes.
    N(	Rt_run_validatorsR&R�RRR$RHRD(tinstR>tv((sE/usr/lib64/python2.7/site-packages/mercurial/thirdparty/attr/_make.pytvalidate�s	cC`s�g}|tkr4|jd�d�}d�}nd�}d�}g}g}i}x�|D]�}	|	jr~|j|	�n|	j}
|	jjd�}t|	jt�}|r�|	jjr�d}
nd}
|	j	t
kr�|r}tj|	j�}|	j
dk	rG|j||
|d	j|
���tj|	j�}|	j
||<n#|j||
|d	j|
���|	jj||<q|	j
dk	r�|j||
d
jd|
���tj|	j�}|	j
||<q|j||
d
jd|
���q_|	jtk	r�|r�|jdjd
|d|
��|	j
dk	rk|j||
|��|	j
|tj|	j�<q|j||
|��q_|r�|jdjd
|��|jdjd
|��tj|	j�}|	j
dk	rG|jd||
|��|jd�|jd||
|d	j|
���|	j
|tj|	j�<nN|jd||
|��|jd�|jd||
|d	j|
���|	jj||<q_|j|�|	j
dk	r�|j||
|��|	j
|tj|	j�<q_|j||
|��q_W|r�t|d<|jd�xk|D]`}	dj|	j�}dj|	j�}
|jdj||
|	j��|	j||<|	||
<q4Wn|r�|jd�ndjddj|�d|r�dj|�nd�|fS(s�
    Return a script of an initializer for *attrs* and a dict of globals.

    The globals are expected by the generated script.

     If *frozen* is True, we cannot set the attributes directly so we use
    a cached ``object.__setattr__``.
    s8_setattr = _cached_setattr.__get__(self, self.__class__)cS`sdi|d6|d6S(Ns(_setattr('%(attr_name)s', %(value_var)s)R+t	value_var((R+R�((sE/usr/lib64/python2.7/site-packages/mercurial/thirdparty/attr/_make.pyt
fmt_setter�scS`s,tj|�}di|d6|d6|d6S(Ns2_setattr('%(attr_name)s', %(conv)s(%(value_var)s))R+R�tconv(t_init_convert_patR.(R+R�t	conv_name((sE/usr/lib64/python2.7/site-packages/mercurial/thirdparty/attr/_make.pytfmt_setter_with_converter�s
cS`sdi|d6|d6S(Nsself.%(attr_name)s = %(value)sR+R[((R+R[((sE/usr/lib64/python2.7/site-packages/mercurial/thirdparty/attr/_make.pyR��scS`s,tj|�}di|d6|d6|d6S(Ns,self.%(attr_name)s = %(conv)s(%(value_var)s)R+R�R�(R�R.(R+R�R�((sE/usr/lib64/python2.7/site-packages/mercurial/thirdparty/attr/_make.pyR��s
RRR,s({0})s attr_dict['{attr_name}'].defaultR+s+{arg_name}=attr_dict['{attr_name}'].defaulttarg_names{arg_name}=NOTHINGsif {arg_name} is not NOTHING:s    selse:Rs#if _config._run_validators is True:s__attr_validator_{}s	__attr_{}s    {}(self, {}, self.{})sself.__attrs_post_init__()s(def __init__(self, {args}):
    {lines}
targss, tliness
    tpassN(R%R0RRDtlstripRLRtFactoryt
takes_selfR!R&t_init_factory_patR.R"R$R�tfactoryRRR4(R|Rtt	post_initR�R�R�R�tattrs_to_validatetnames_for_globalsR>R+R�thas_factoryt
maybe_selftinit_factory_nameR�tval_name((sE/usr/lib64/python2.7/site-packages/mercurial/thirdparty/attr/_make.pyR��s�				
							
			








	RNc	B`sMeZdZdZddd
�Zd�Zed��Zd
�Z	d�Z
RS(s�
    *Read-only* representation of an attribute.

    :attribute name: The name of the attribute.

    Plus *all* arguments of :func:`attr.ib`.
    RDRRRRR R!R"R#c
C`s�tj|t�}
|
d|�|
d|�|
d|�|
d|�|
d|�|
d|�|
d|�|
d|�|
d	|	r�t|	�nt�dS(
NRDRRRRR R!R"R#(R�R�RNR	t_empty_metadata_singleton(RRDRRRRR R!R"R#t
bound_setattr((sE/usr/lib64/python2.7/site-packages/mercurial/thirdparty/attr/_make.pyR�?s







cC`s
t��dS(N(R(RRDR[((sE/usr/lib64/python2.7/site-packages/mercurial/thirdparty/attr/_make.pyRhOsc`s;�fd�tjD�}|d|d�jd�j|�S(Nc`s.i|]$}|dkrt�|�|�qS(RDRR(RDRR(RH(R=tk(RE(sE/usr/lib64/python2.7/site-packages/mercurial/thirdparty/attr/_make.pys
<dictcomp>Us	RDRR(RNR_t
_validatort_default(RRRDREt	inst_dict((REsE/usr/lib64/python2.7/site-packages/mercurial/thirdparty/attr/_make.pyRORs
c`st�fd��jD��S(s(
        Play nice with pickle.
        c3`s9|]/}|dkr$t�|�nt�j�VqdS(R#N(RHRkR#(R=RD(R(sE/usr/lib64/python2.7/site-packages/mercurial/thirdparty/attr/_make.pys	<genexpr>ds(RlR_(R((RsE/usr/lib64/python2.7/site-packages/mercurial/thirdparty/attr/_make.pyR�`scC`sttj|t�}x[t|j|�D]G\}}|dkrM|||�q%|||ret|�nt�q%WdS(s(
        Play nice with pickle.
        R#N(R�R�RNR�R_R	R�(RR�R�RDR[((sE/usr/lib64/python2.7/site-packages/mercurial/thirdparty/attr/_make.pyR�hs(	RDRRRRR R!R"R#N(RRRR_R$R�RhtclassmethodROR�R�(((sE/usr/lib64/python2.7/site-packages/mercurial/thirdparty/attr/_make.pyRN2s		RDRRRRR R#R!R|R(cB`seZdZdZed
�dD��eddddd
ddededede�fZ	dZ
d�Zd�Zd�Z
RS(s
    Intermediate representation of attributes that uses a counter to preserve
    the order in which the attributes have been defined.

    *Internal* data structure of the attrs library.  Running into is most
    likely the result of a bug like a forgotten `@attr.s` decorator.
    RAR�RRR R!R#R�R"cc`sB|]8}td|dtdddtdtdtdt�VqdS(RDRRRRR R!N(RNRR$R%(R=RD((sE/usr/lib64/python2.7/site-packages/mercurial/thirdparty/attr/_make.pys	<genexpr>�sRDRRic		C`s�tjd7_tj|_||_|rQt|ttf�rQt|�|_n	||_||_	||_
||_||_||_
||_dS(Ni(R(tcls_counterRAR�RLRaRltand_R�RRR R!R"R#(	RRRRRR R!R"R#((sE/usr/lib64/python2.7/site-packages/mercurial/thirdparty/attr/_make.pyR��s							cC`s4|jdkr||_nt|j|�|_|S(s�
        Decorator that adds *meth* to the list of validators.

        Returns *meth* unchanged.

        .. versionadded:: 17.1.0
        N(R�R$R�(Rtmeth((sE/usr/lib64/python2.7/site-packages/mercurial/thirdparty/attr/_make.pyR�scC`s4|jtk	rt��nt|dt�|_|S(s�
        Decorator that allows to set the default for an attribute.

        Returns *meth* unchanged.

        :raises DefaultAlreadySetError: If default has been set before.

        .. versionadded:: 17.1.0
        R�(R�RR
R�R%(RR�((sE/usr/lib64/python2.7/site-packages/mercurial/thirdparty/attr/_make.pyR�s
(	RAR�RRR R!R#R�R"(RAR�RRR R!N(RRRR_RlRNR$R%R&R<R�R�RR(((sE/usr/lib64/python2.7/site-packages/mercurial/thirdparty/attr/_make.pyR(s
		RvR�cB`s,eZdZe�Ze�Zed�ZRS(s�
    Stores a factory callable.

    If passed as the default value to :func:`attr.ib`, the factory is used to
    generate a new value.

    :param callable factory: A callable that takes either none or exactly one
        mandatory positional argument depending on *takes_self*.
    :param bool takes_self: Pass the partially initialized instance that is
        being initialized as a positional argument.

    .. versionadded:: 17.1.0  *takes_self*
    cC`s||_||_dS(s�
        `Factory` is part of the default machinery so if we want a default
        value here, we have to implement it ourselves.
        N(R�R�(RR�R�((sE/usr/lib64/python2.7/site-packages/mercurial/thirdparty/attr/_make.pyR��s	(RRRR)R�R�R&R�(((sE/usr/lib64/python2.7/site-packages/mercurial/thirdparty/attr/_make.pyR��s		cK`snt|t�r|}n:t|ttf�rFtd�|D��}ntd��t|�t|||��S(s
    A quick way to create a new class called *name* with *attrs*.

    :param name: The name for the new class.
    :type name: str

    :param attrs: A list of names or a dictionary of mappings of names to
        attributes.
    :type attrs: :class:`list` or :class:`dict`

    :param tuple bases: Classes that the new class will subclass.

    :param attributes_arguments: Passed unmodified to :func:`attr.s`.

    :return: A new class with *attrs*.
    :rtype: type

    ..  versionadded:: 17.1.0 *bases*
    cs`s|]}|t�fVqdS(N(R)(R=R>((sE/usr/lib64/python2.7/site-packages/mercurial/thirdparty/attr/_make.pys	<genexpr>�ss(attrs argument must be a dict or a list.(RLRkRaRlR'RzRn(RDR|tbasestattributes_argumentsRq((sE/usr/lib64/python2.7/site-packages/mercurial/thirdparty/attr/_make.pyt
make_class�s	t
_AndValidatorcB`s eZdZe�Zd�ZRS(s2
    Compose many validators to a single one.
    cC`s(x!|jD]}||||�q
WdS(N(t_validators(RR�R)R[R�((sE/usr/lib64/python2.7/site-packages/mercurial/thirdparty/attr/_make.pyt__call__s(RRRR)R�R�(((sE/usr/lib64/python2.7/site-packages/mercurial/thirdparty/attr/_make.pyR�s	cG`sOg}x6|D].}|jt|t�r1|jn|g�q
Wtt|��S(s�
    A validator that composes multiple validators into one.

    When called on a value, it runs all wrapped validators.

    :param validators: Arbitrary number of validators.
    :type validators: callables

    .. versionadded:: 17.1.0
    (RIRLR�R�Rl(t
validatorstvalsR((sE/usr/lib64/python2.7/site-packages/mercurial/thirdparty/attr/_make.pyR�s
(;t
__future__RRRR�R�toperatorRR,Rt_compatRRRRR	t
exceptionsR
RRtobjectRhR�R�R�R1R�R
RR$R%R)R;RZR\R]R&RzRbR}RfReRcRgRjR�R�R�RNR_RDt_aR>R R(R�R�R�R�(((sE/usr/lib64/python2.7/site-packages/mercurial/thirdparty/attr/_make.pyt<module>sb(		T		5			�		N	-				�CL%F"