%PDF- %PDF-
| Direktori : /usr/lib/python3.9/site-packages/attr/__pycache__/ |
| Current File : //usr/lib/python3.9/site-packages/attr/__pycache__/_next_gen.cpython-39.pyc |
a
Pͣ_* � @ s� d Z ddlmZ ddlmZ ddlmZ ddlmZm Z m
Z
mZ ddddddd dd dd d ddd ddddd
�dd�ZeZ
eeddd
�Zedddddddd dddd�dd�ZdS )z�
This is a Python 3.6 and later-only, keyword-only, and **provisional** API that
calls `attr.s` with different default values.
Provisional APIs that shall become "import attrs" one glorious day.
� )�partial)�UnannotatedAttributeError� )�setters)�NOTHING�_frozen_setattrs�attrib�attrsNTF)�these�repr�hash�init�slots�frozen�weakref_slot�str�auto_attribs�kw_only�
cache_hash�auto_exc�eq�order�auto_detect�getstate_setstate�
on_setattr�field_transformerc sV �������� �
���
�����fdd��� ���fdd�}| du rJ|S || �S dS )a4
The only behavioral differences are the handling of the *auto_attribs*
option:
:param Optional[bool] auto_attribs: If set to `True` or `False`, it behaves
exactly like `attr.s`. If left `None`, `attr.s` will try to guess:
1. If all attributes are annotated and no `attr.ib` is found, it assumes
*auto_attribs=True*.
2. Otherwise it assumes *auto_attribs=False* and tries to collect
`attr.ib`\ s.
and that mutable classes (``frozen=False``) validate on ``__setattr__``.
.. versionadded:: 20.1.0
c s0 t | �����
���|� ����� d��
�d�S )NT)� maybe_clsr
r r r
r r r r r r r r r r r Zcollect_by_mror r r )r )�clsr )r r r r r r r r r
r r r r r r r
r � �2/usr/lib/python3.9/site-packages/attr/_next_gen.py�do_it7 s, �zdefine.<locals>.do_itc s� �dt jfv}�du r$�du r$t j�| jD ]$}|jtu r*|rDtd��t j� qPq*� durb�| � �S z�| d�W S ty� �| d� Y S 0 dS )z�
Making this a wrapper ensures this code runs during class creation.
We also ensure that frozen-ness of classes is inherited.
NFz@Frozen classes can't use on_setattr (frozen-ness was inherited).T)r ZNO_OPZvalidate� __bases__�__setattr__r �
ValueErrorr )r Zhad_on_setattrZbase_cls)r r r r r r �wrapO s"