Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes15kdownloads
inspection.cpython-313.pyc84 linesDownload Raw Back to __pycache__
1�

2��ju���%SrSSKJr SSKJr SSKJr SSKJr SSKJr SSKJr SSKJ	r	 SS	KJ3r4 SS5KJr SSKJr SS
K
Jr SSKJr SSKJr \"S\S9r\"S\SS9r\"S\S\4S9r\"S\S9r0rS\S'"SS\\5r"SS\\5r"SS\\5r\	S+S,S jj5r\	S+S-S!jj5r\	S+S.S"jj5r\	S/S0S#jj5r\	S+S1S$jj5rS+S1S%jjrS2S'jr\"S(S&S9rS3S)jrg*)4a7The inspection module provides the :func:`_sa.inspect` function,6which delivers runtime information about a wide variety7of SQLAlchemy objects, both within the Core as well as the8ORM.9 10The :func:`_sa.inspect` function is the entry point to SQLAlchemy's11public API for viewing the configuration and construction12of in-memory objects.   Depending on the type of object13passed to :func:`_sa.inspect`, the return value will either be14a related object which provides a known interface, or in many15cases it will return the object itself.16 17The rationale for :func:`_sa.inspect` is twofold.  One is that18it replaces the need to be aware of a large variety of "information19getting" functions in SQLAlchemy, such as20:meth:`_reflection.Inspector.from_engine` (deprecated in 1.4),21:func:`.orm.attributes.instance_state`, :func:`_orm.class_mapper`,22and others.    The other is that the return value of :func:`_sa.inspect`23is guaranteed to obey a documented API, thus allowing third party24tools which build on top of SQLAlchemy configurations to be constructed25in a forwards-compatible way.26 27�)�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��\rSrSrSrSrSrg)�Inspectable�8a define a class as inspectable.28 29This allows typing to set up a linkage between an object that30can be inspected and the type of inspection it returns.31 32Unfortunately we cannot at the moment get all classes that are33returned by inspection to suit this interface as we get into34MRO issues.35 36�N)�__name__�37__module__�__qualname__�__firstlineno__�__doc__�	__slots__�__static_attributes__r��[D:\code\apps\devtools\python\user_packages\Python313\site-packages\sqlalchemy/inspection.pyrr8s��	��Ir#rc�"�\rSrSrSrSSjrSrg)�_InspectableTypeProtocol�Gzda protocol defining a method that's used when a type (ie the class38itself) is passed to inspect().39 40c��g�Nr��selfs r$�_sa_inspect_type�)_InspectableTypeProtocol._sa_inspect_typeMs��r#rN��returnr)rrrrr r,r"rr#r$r&r&Gs���41-r#r&c�"�\rSrSrSrSSjrSrg)�_InspectableProtocol�PzSa protocol defining a method that's used when an instance is42passed to inspect().43 44c��gr)rr*s r$�_sa_inspect_instance�)_InspectableProtocol._sa_inspect_instanceVs��Sr#rNr.)rrrrr r4r"rr#r$r1r1Ps���451r#r1c��gr)r��subject�raiseerrs  r$�inspectr:Y���r#c��gr)rr7s  r$r:r:_r;r#c��gr)rr7s  r$r:r:es��FIr#c��gr)rr7s  r$r:r:is��LOr#c��gr)rr7s  r$r:r:ms��9<r#c��[U5nURHBnU[;dM[RUS5nUcM*USLaUs $U"U5nUcM@Us $ S=pEU(aUbUc[R46"SU-5eU$)azProduce an inspection object for the given target.47 48The returned value in some cases may be the49same object as the one given, such as if a50:class:`_orm.Mapper` object is passed.   In other51cases, it will be an instance of the registered52inspection type for the given object, such as53if an :class:`_engine.Engine` is passed, an54:class:`_reflection.Inspector` object is returned.55 56:param subject: the subject to be inspected.57:param raiseerr: When ``True``, if the given subject58 does not59 correspond to a known SQLAlchemy inspected type,60 :class:`sqlalchemy.exc.NoInspectionAvailable`61 is raised.  If ``False``, ``None`` is returned.62 63NTz7No inspection system is available for object of type %s)�type�__mro__r�getr�NoInspectionAvailable)r8r9�type_�cls�reg�rets      r$r:r:qs���&
��M�E��}�}���+���/�/�#�t�,�C��{��������g�,�C����64������S�[�C�K��'�'�
.�05�
6�65�	66��Jr#�	Type[Any]c�^�SU4SjjnU$)Nc�\>�TH$nU[;a[SU-5eU[U'M& U$)N�Type %s is already registered�r�AssertionError)�	fn_or_clsrE�typess  �r$�decorate�_inspects.<locals>.decorate�s8����E���#�$�%D�u�%L�M�M�!*�K�����r#)rOrr/rr)rPrQs` r$�	_inspectsrS�s�����Or#�_TTc�H�U[;a[SU-5eS[U'U$)NrLTrM)rFs r$�_self_inspectsrV�s*��67�k���<�s�B�C�C��K����Jr#N)T)r8z#Type[_InspectableTypeProtocol[_IN]]r9�boolr/r)r8z_InspectableProtocol[_IN]r9rWr/r)r8zInspectable[_IN]r9rWr/r).)r8rr9zLiteral[False]r/z
Optional[Any])r8rr9rWr/r)rPrIr/zCallable[[_F], _F])rFrTr/rT)r �68__future__r�typingrrrrrr	r69rr�r�util.typingrrrrrrr�__annotations__rr&r1r:rSrTrVrr#r$�<module>r]se���.#����������� �!��T������s�d�3���T��#�s�(�+�,��
�e�3���FH��
C�H��'�"�+��-�x���-�1�8�E�?�1�70�CG��
0��<@����71��7273�9=��
&��26����74��7576�I�77�I�78�O�79�O�80�<�81�<�&�R82��83��84��e�;�'��r#
codekingpro/portable-devtools · Team Ai