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/_funcs.pyc
�
1�3\c@`s�ddlmZmZmZddlZddlmZddlmZm	Z	m
Z
ddlmZe
deed�Ze
deed�Zd	�Zd
�Zd�ZdS(i(tabsolute_importtdivisiontprint_functionNi(t	iteritems(tNOTHINGtfieldst_obj_setattr(tAttrsAttributeNotFoundErrorc`s�t|j�}|�}xl|D]d}t||j�}|dk	rY|||�rYqn|tkrvt|j�r�t|dtd|d|�||j<q�t|t	t
tf�r%|tkr�|jnt
}	|	g|D]9}
t|
j�rt|
dtd|d|�n|
^q��||j<q�t|t�rf|���fd�t
|�D��||j<q�|||j<q|||j<qW|S(s�
    Return the ``attrs`` attribute values of *inst* as a dict.

    Optionally recurse into other ``attrs``-decorated classes.

    :param inst: Instance of an ``attrs``-decorated class.
    :param bool recurse: Recurse into classes that are also
        ``attrs``-decorated.
    :param callable filter: A callable whose return code deteremines whether an
        attribute or element is included (``True``) or dropped (``False``).  Is
        called with the :class:`attr.Attribute` as the first argument and the
        value as the second argument.
    :param callable dict_factory: A callable to produce dictionaries from.  For
        example, to produce ordered dictionaries instead of normal Python
        dictionaries, pass in ``collections.OrderedDict``.
    :param bool retain_collection_types: Do not convert to ``list`` when
        encountering an attribute whose type is ``tuple`` or ``set``.  Only
        meaningful if ``recurse`` is ``True``.

    :rtype: return type of *dict_factory*

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

    ..  versionadded:: 16.0.0 *dict_factory*
    ..  versionadded:: 16.1.0 *retain_collection_types*
    trecursetfiltertdict_factoryc3`sc|]Y\}}t|j�r0t|d��n|t|j�rTt|d��n|fVqdS(R
N(thast	__class__tasdict(t.0tkktvv(tdf(sF/usr/lib64/python2.7/site-packages/mercurial/thirdparty/attr/_funcs.pys	<genexpr>;sN(RRtgetattrtnametNonetTrueRR
t
isinstancettupletlisttsettdictR(tinstRR	R
tretain_collection_typestattrstrvtatvtcfti((RsF/usr/lib64/python2.7/site-packages/mercurial/thirdparty/attr/_funcs.pyR

s,	
Pc`s�t|j�}g}|�x�|D]�}t||j�}|dk	r\|||�r\q"n|tkr�t|j�r�|jt|dtd|d�d���q�t	|t
ttf�r4�tkr�|jnt}	|j|	g|D]?}
t|
j�r!t|
dtd|d�d��n|
^q���q�t	|t
�r��tkrX|jnt
}|j|��fd�t|�D���q�|j|�q"|j|�q"W�tkr�|S�|�S(s8
    Return the ``attrs`` attribute values of *inst* as a tuple.

    Optionally recurse into other ``attrs``-decorated classes.

    :param inst: Instance of an ``attrs``-decorated class.
    :param bool recurse: Recurse into classes that are also
        ``attrs``-decorated.
    :param callable filter: A callable whose return code determines whether an
        attribute or element is included (``True``) or dropped (``False``).  Is
        called with the :class:`attr.Attribute` as the first argument and the
        value as the second argument.
    :param callable tuple_factory: A callable to produce tuples from.  For
        example, to produce lists instead of tuples.
    :param bool retain_collection_types: Do not convert to ``list``
        or ``dict`` when encountering an attribute which type is
        ``tuple``, ``dict`` or ``set``.  Only meaningful if ``recurse`` is
        ``True``.

    :rtype: return type of *tuple_factory*

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

    ..  versionadded:: 16.2.0
    RR	t
tuple_factoryRc3`so|]e\}}t|j�r6t|d�d��n|t|j�r`t|d�d��n|fVqdS(R#RN(RRtastuple(RRR(tretainR#(sF/usr/lib64/python2.7/site-packages/mercurial/thirdparty/attr/_funcs.pys	<genexpr>zsN(RRRRRRRtappendR$RRRRRR(RRR	R#RRRRR R!tjR((R%R#sF/usr/lib64/python2.7/site-packages/mercurial/thirdparty/attr/_funcs.pyR$Fs2

	P	cC`st|dd�dk	S(s�
    Check whether *cls* is a class with ``attrs`` attributes.

    :param type cls: Class to introspect.
    :raise TypeError: If *cls* is not a class.

    :rtype: :class:`bool`
    t__attrs_attrs__N(RR(tcls((sF/usr/lib64/python2.7/site-packages/mercurial/thirdparty/attr/_funcs.pyR�s	cK`s�ddl}|jdt�tj|�}t|j�}xlt|�D]^\}}t||t�}|tkr�t	dj
d|d|j���nt|||�qGW|S(s�
    Copy *inst* and apply *changes*.

    :param inst: Instance of a class with ``attrs`` attributes.
    :param changes: Keyword changes in the new copy.

    :return: A copy of inst with *changes* incorporated.

    :raise attr.exceptions.AttrsAttributeNotFoundError: If *attr_name* couldn't
        be found on *cls*.
    :raise attr.exceptions.NotAnAttrsClassError: If *cls* is not an ``attrs``
        class.

    ..  deprecated:: 17.1.0
        Use :func:`evolve` instead.
    iNs6assoc is deprecated and will be removed after 2018/01.s&{k} is not an attrs attribute on {cl}.tktcl(twarningstwarntDeprecationWarningtcopyRRRRRRtformatR(RtchangesR,tnewRR*R R((sF/usr/lib64/python2.7/site-packages/mercurial/thirdparty/attr/_funcs.pytassoc�s		cK`s�|j}t|�}xh|D]`}|js1qn|j}|ddkrP|n|d}||krt||�||<qqW||�S(s�
    Create a new instance, based on *inst* with *changes* applied.

    :param inst: Instance of a class with ``attrs`` attributes.
    :param changes: Keyword changes in the new copy.

    :return: A copy of inst with *changes* incorporated.

    :raise TypeError: If *attr_name* couldn't be found in the class
        ``__init__``.
    :raise attr.exceptions.NotAnAttrsClassError: If *cls* is not an ``attrs``
        class.

    ..  versionadded:: 17.1.0
    it_i(RRtinitRR(RR1R)RRt	attr_namet	init_name((sF/usr/lib64/python2.7/site-packages/mercurial/thirdparty/attr/_funcs.pytevolve�s	
		 (t
__future__RRRR/t_compatRt_makeRRRt
exceptionsRRRRtFalseR
RR$RR3R8(((sF/usr/lib64/python2.7/site-packages/mercurial/thirdparty/attr/_funcs.pyt<module>s	;	G		!