qg[w X d Z ddlZddlZddlmZ ddlmZ ddlmZ ddlmZ ddlmZ dd lm Z dd l mZ ddlm Z dd lmZ ddlmZ ddlmZ ddlmZ ddlm Z ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlm Z ddlm!Z! ddlm"Z" d Z#d Z$ G d de% Z&d1d!Z'd" Z( G d# d$ej) e* Z+ G d% d&e+ Z,ddde-d'ede&fd(Z.d) Z/ G d* d+e- Z0 G d, d-e0 Z1 G d. d/e- Z2 ej3 e& d0 Z4dS )2z1Public API functions and helpers for declarative. N _add_attribute)_as_declarative)_declarative_constructor)_DeferredMapperConfig_del_attribute)_get_immediate_cls_attr)_class_resolver )exc) inspection)util) attributescomparable_property) interfaces) properties)synonym)_inspect_mapped_class)_mapper_or_none)polymorphic_union)MetaData)Table)hybridmethod)hybridproperty)OrderedDictc d| j v rt j d| z || _ || _ t | | j | j dS )zGiven a class, configure the class declaratively, using the given registry, which can be any dictionary, and MetaData object. _decl_class_registryz4Class %r already has been instrumented declarativelyN)__dict__r InvalidRequestErrorr metadatar __name__)clsregistryr# s r/builddir/build/BUILD/cloudlinux-venv-1.0.10/venv/lib64/python3.11/site-packages/sqlalchemy/ext/declarative/api.pyinstrument_declarativer( ' s[ --%EK (CCLCs|44444 c R | j dd D ]}t |dd dS dS )aK Given a class, return True if any of the classes it inherits from has a mapped table, otherwise return False. This is used in declarative mixins to build attributes that behave differently for the base class vs. a subclass in an inheritance hierarchy. .. seealso:: :ref:`decl_mixin_inheritance` r N __table__TF)__mro__getattr)r% class_s r' has_inherited_tabler/ 6 s@ +abb/ 6;--944 :5r) c e Zd Zd Zd Zd ZdS )DeclarativeMetac ~ d| j vrt | || j t | ||| d S )Nr )r! r type__init__)r% classnamebasesdict_kws r' r4 zDeclarativeMeta.__init__J sA !55CCL999 c9eU33333r) c ( t | || d S Nr )r% keyvalues r' __setattr__zDeclarativeMeta.__setattr__O s sC'''''r) c &