PK APOCALYPSE V1

APOCALYPSE V1

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

�

���g����UdZddlmZddlmZddlmZddlmZddlmZddlmZddlm	Z	dd	lm
Z
dd
lmZddlmZdd
l
mZddlmZddlmZede��Zeded��Zededef��Zede��ZiZded<Gd�dee�ZGd�dee�ZGd�dee�Ze		d+					d,d ��Ze		d+					d-d!��Ze	d+d.d"��Ze	d/d0d#��Ze	d+d1d$��Zd+d1d%�Z				d2d'�Zed(d&��Zd3d)�Zy*)4a7The inspection module provides the :func:`_sa.inspect` function,
which delivers runtime information about a wide variety
of SQLAlchemy objects, both within the Core as well as the
ORM.

The :func:`_sa.inspect` function is the entry point to SQLAlchemy's
public API for viewing the configuration and construction
of in-memory objects.   Depending on the type of object
passed to :func:`_sa.inspect`, the return value will either be
a related object which provides a known interface, or in many
cases it will return the object itself.

The rationale for :func:`_sa.inspect` is twofold.  One is that
it replaces the need to be aware of a large variety of "information
getting" functions in SQLAlchemy, such as
:meth:`_reflection.Inspector.from_engine` (deprecated in 1.4),
:func:`.orm.attributes.instance_state`, :func:`_orm.class_mapper`,
and others.    The other is that the return value of :func:`_sa.inspect`
is guaranteed to obey a documented API, thus allowing third party
tools which build on top of SQLAlchemy configurations to be constructed
in a forwards-compatible way.

�)�annotations)�Any)�Callable)�Dict)�Generic)�Optional)�overload)�Type)�TypeVar)�Union�)�exc)�Literal)�Protocol�_T)�bound�_TCovT)r�	covariant�_F.�_INz6Dict[type, Union[Literal[True], Callable[[Any], Any]]]�_registrarsc��eZdZdZdZy)�Inspectablea8define a class as inspectable.

    This allows typing to set up a linkage between an object that
    can be inspected and the type of inspection it returns.

    Unfortunately we cannot at the moment get all classes that are
    returned by inspection to suit this interface as we get into
    MRO issues.

    �N)�__name__�
__module__�__qualname__�__doc__�	__slots__r��F/opt/hc_python/lib64/python3.12/site-packages/sqlalchemy/inspection.pyrr8s��	��Ir rc��eZdZdZdd�Zy)�_InspectableTypeProtocolzla protocol defining a method that's used when a type (ie the class
    itself) is passed to inspect().

    c��y�Nr��selfs r!�_sa_inspect_typez)_InspectableTypeProtocol._sa_inspect_typeMs��r N��returnr)rrrrr(rr r!r#r#Gs���
-r r#c��eZdZdZdd�Zy)�_InspectableProtocolz[a protocol defining a method that's used when an instance is
    passed to inspect().

    c��yr%rr&s r!�_sa_inspect_instancez)_InspectableProtocol._sa_inspect_instanceVs��Sr Nr))rrrrr.rr r!r,r,Ps���
1r r,c��yr%r��subject�raiseerrs  r!�inspectr3Y���r c��yr%rr0s  r!r3r3_r4r c��yr%rr0s  r!r3r3es��FIr c��yr%rr0s  r!r3r3is��LOr c��yr%rr0s  r!r3r3ms��9<r c���t|�}|jD]:}|tvs�tj|d�}|��%|dur|cS||�}|��8|cSdx}}|r|�|�t	j
d|z��|S)a�Produce an inspection object for the given target.

    The returned value in some cases may be the
    same object as the one given, such as if a
    :class:`_orm.Mapper` object is passed.   In other
    cases, it will be an instance of the registered
    inspection type for the given object, such as
    if an :class:`_engine.Engine` is passed, an
    :class:`_reflection.Inspector` object is returned.

    :param subject: the subject to be inspected.
    :param raiseerr: When ``True``, if the given subject
     does not
     correspond to a known SQLAlchemy inspected type,
     :class:`sqlalchemy.exc.NoInspectionAvailable`
     is raised.  If ``False``, ``None`` is returned.

    NTz7No inspection system is available for object of type %s)�type�__mro__r�getr�NoInspectionAvailable)r1r2�type_�cls�reg�rets      r!r3r3qs���&
��M�E��}�}���+���/�/�#�t�,�C��{��������g�,�C����
�����c��S�[�C�K��'�'�
.�05�
6�
�	
��Jr �	Type[Any]c���d�fd�}|S)Nc�T���D]!}|tvrtd|z��|t|<�#|S)N�Type %s is already registered�r�AssertionError)�	fn_or_clsr>�typess  �r!�decoratez_inspects.<locals>.decorate�s8����E���#�$�%D�u�%L�M�M�!*�K�����r )rHrr*rr)rIrJs` r!�	_inspectsrK�s�����Or �_TTc�D�|tvrtd|z��dt|<|S)NrETrF)r?s r!�_self_inspectsrN�s*��
�k���<�s�B�C�C��K����Jr N)T)r1z#Type[_InspectableTypeProtocol[_IN]]r2�boolr*r)r1z_InspectableProtocol[_IN]r2rOr*r)r1zInspectable[_IN]r2rOr*r).)r1rr2zLiteral[False]r*z
Optional[Any])r1rr2rOr*r)rIrBr*zCallable[[_F], _F])r?rLr*rL)r�
__future__r�typingrrrrrr	r
rr�r�util.typingrrrrrrr�__annotations__rr#r,r3rKrLrNrr r!�<module>rUse���.#����������� �!��T������s�d�3���T��#�s�(�+�,��
�e�3���FH��
C�H��'�"�+��-�x���-�1�8�E�?�1�
�CG��
0��<@����
��

�9=��
&��26����
��

�I�
�I�
�O�
�O�
�<�
�<�&�R
��
��
��e�;�'��r 

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