PK APOCALYPSE V1

APOCALYPSE V1

Current Path : /opt/hc_python/lib/python3.12/site-packages/pydantic/__pycache__/
Upload File :
Current File : //opt/hc_python/lib/python3.12/site-packages/pydantic/__pycache__/aliases.cpython-312.pyc

�

���g���B�dZddlmZddlZddlmZmZmZddlm	Z	ddl
mZdZejdiej��Gd	�d
��Zejdiej��Gd�d��Zejdiej��Gd
�d��Zy)z!Support for alias configurations.�)�annotationsN)�Any�Callable�Literal)�PydanticUndefined�)�_internal_dataclass)�AliasGenerator�	AliasPath�AliasChoicesc�4�eZdZUdZded<dd�Zd	d�Zd
d�Zy)rz�Usage docs: https://docs.pydantic.dev/2.8/concepts/alias#aliaspath-and-aliaschoices

    A data class used by `validation_alias` as a convenience to create aliases.

    Attributes:
        path: A list of string or integer aliases.
    zlist[int | str]�pathc�,�|gt|�z|_y�N)�listr)�self�	first_arg�argss   �?/opt/hc_python/lib/python3.12/site-packages/pydantic/aliases.py�__init__zAliasPath.__init__s���K�$�t�*�,��	�c��|jS)zvConverts arguments to a list of string or integer aliases.

        Returns:
            The list of aliases.
        )r)rs r�convert_to_aliaseszAliasPath.convert_to_aliasess���y�y�rc��|}|jD] }t|t�rtcS	||}�"|S#tt
tf$rtcYcSwxYw)z�Searches a dictionary for the path specified by the alias.

        Returns:
            The value at the specified path, or `PydanticUndefined` if the path is not found.
        )r�
isinstance�strr�KeyError�
IndexError�	TypeError)r�d�v�ks    r�search_dict_for_pathzAliasPath.search_dict_for_path&sZ��
�����A��!�S�!�(�(�
)��a�D�������j�)�4�
)�(�(�
)�s�4�A�AN)rrrz	str | int�return�None)r$zlist[str | int])r �dictr$r)�__name__�
__module__�__qualname__�__doc__�__annotations__rrr#�rrrrs�����-��rrc�,�eZdZUdZded<dd�Zdd�Zy)	rz�Usage docs: https://docs.pydantic.dev/2.8/concepts/alias#aliaspath-and-aliaschoices

    A data class used by `validation_alias` as a convenience to create aliases.

    Attributes:
        choices: A list containing a string or `AliasPath`.
    zlist[str | AliasPath]�choicesc�,�|gt|�z|_yr)rr.)r�first_choicer.s   rrzAliasChoices.__init__Ds��$�~��W�
�5��rc��g}|jD]D}t|t�r |j|j	���3|j|g��F|S)z�Converts arguments to a list of lists containing string or integer aliases.

        Returns:
            The list of aliases.
        )r.rr�appendr)r�aliases�cs   rrzAliasChoices.convert_to_aliasesGsK��*,�����A��!�Y�'����q�3�3�5�6�����s�#�	�
�rN)r0�str | AliasPathr.r5r$r%)r$zlist[list[str | int]])r'r(r)r*r+rrr,rrrr8s���#�"�6�rrc�\�eZdZUdZdZded<dZded<dZded<								d
d�Zdd	�Z	y)r
a�Usage docs: https://docs.pydantic.dev/2.8/concepts/alias#using-an-aliasgenerator

    A data class used by `alias_generator` as a convenience to create various aliases.

    Attributes:
        alias: A callable that takes a field name and returns an alias for it.
        validation_alias: A callable that takes a field name and returns a validation alias for it.
        serialization_alias: A callable that takes a field name and returns a serialization alias for it.
    NzCallable[[str], str] | None�aliasz6Callable[[str], str | AliasPath | AliasChoices] | None�validation_alias�serialization_aliasc	�|�d}t||�x}r+||�}|r!t||�std|�d|�d|�d���|S)z�Generate an alias of the specified kind. Returns None if the alias generator is None.

        Raises:
            TypeError: If the alias generator produces an invalid type.
        Nz	Invalid `z	` type. `z!` generator must produce one of `�`)�getattrrr)r�
alias_kind�
allowed_types�
field_namer7�alias_generators      r�_generate_aliaszAliasGenerator._generate_aliasfsa����%�d�J�7�7�?�7�#�J�/�E��Z��}�=���
�|�9�Z�L�@a�bo�ap�pq�r����rc��|jdtf|�}|jdtttf|�}|jdtf|�}|||fS)z�Generate `alias`, `validation_alias`, and `serialization_alias` for a field.

        Returns:
            A tuple of three aliases - validation, alias, and serialization.
        r7r8r9)rArrr)rr?r7r8r9s     r�generate_aliaseszAliasGenerator.generate_aliaseszsa���$�$�W�s�f�j�A���/�/�0B�S�,�Xa�Db�dn�o��"�2�2�3H�3�&�R\�]���&�(;�;�;r)r=z;Literal['alias', 'validation_alias', 'serialization_alias']r>z<tuple[type[str] | type[AliasPath] | type[AliasChoices], ...]r?rr$z%str | AliasPath | AliasChoices | None)r?rr$zDtuple[str | None, str | AliasPath | AliasChoices | None, str | None])
r'r(r)r*r7r+r8r9rArCr,rrr
r
Vs]���*.�E�&�-�OS��L�S�7;��4�;��O��T���	�

/��(
<rr
r,)r*�
__future__r�dataclasses�typingrrr�
pydantic_corer�	_internalr	�__all__�	dataclass�
slots_truerrr
r,rr�<module>rLs���'�"��)�)�+�*�
9������8�,�7�7�8�%�%�9�%�P����8�,�7�7�8���9��:����8�,�7�7�8�-<�-<�9�-<r

if you don't want to be vaporized in a nuclear explosion, i simply have to become nuclear myself… i am atomic