mf#ddlmZddlmZddlmZmZmZmZm Z eddZ dZ dZ dZ d Zd Zd ZGd d eZdifdZdS))absolute_import) namedtuple) _int_types _str_typeMappingSequenceSetTypeDefinitionz"name,included_types,excluded_typesctt|t|}|d||d|krt||kSt|D]a}||||}}ttt fD](}t ||rt ||rndS)||krV||krdSdSt)NTF)minlenrangerrtuple isinstance RuntimeError)xy min_lengthiab_types E/opt/imunify360/venv/lib64/python3.11/site-packages/cerberus/utils.pycompare_paths_ltrsSVVSVV$$J*~;J;''1vv## :  tQqT1 )U3  E!U## a'' E444  66  UU4455 c2|d|||dzdzS)N)trs rdrop_item_from_tupler .s! RaR51QUWW: rc<dtvrddlmatS)N Validatorr)r")globalscerberus.validatorr"rrrget_Validator_classr%2s)'))##000000 rc:tt|SN)hashmapping_to_frozenset)schemas r mapping_hashr+9s $V,, - --rc i}|D]\}}t|trt|||<-t|tr^t |}t |D],\}}t|trt|||<-t|||<t|trt|||<|||<t|S)z Be aware that this treats any sequence type with the equal members as equal. As it is used to identify equality of schemas, this can be considered okay as definitions are semantically equal regardless the container type. ) itemsrrr)rlist enumeraterr frozenset)mapping aggregationkeyvalueritems rr)r)=sKmmoo % % U eW % % %3E::K   x ( ( %KKE$U++ : :4dG,,:3D99E!H$U||K   s # # %(//K  $K   [&&(( ) ))rc:t|trd|zS|S)Nz"%s")rr)r4s r quote_stringr7Ws#%##~ rc*eZdZfdZdZdZxZS)readonly_classpropertycTtt||Sr')superr9__get__)selfinstanceowner __class__s rr<zreadonly_classproperty.__get___s"+T22::5AAArc tdNz"This is a readonly class property.r)r=r>r4s r__set__zreadonly_classproperty.__set__b?@@@rc tdrBrC)r=r>s r __delete__z!readonly_classproperty.__delete__erEr)__name__ __module__ __qualname__r<rDrG __classcell__)r@s@rr9r9^seBBBBBAAAAAAAAAArr9Nc&t}||f}n t|tr||fz }n||f}d|D}t|dkr.d|vr*|dd|it |||S)a Dynamically create a :class:`~cerberus.Validator` subclass. Docstrings of mixin-classes will be added to the resulting class' one if ``__doc__`` is not in :obj:`namespace`. :param name: The name of the new class. :type name: :class:`str` :param bases: Class(es) with additional and overriding attributes. :type bases: :class:`tuple` of or a single :term:`class` :param namespace: Attributes for the new class. :type namespace: :class:`dict` :return: The created class. Nc*g|]}|j |jSr)__doc__).0rs r z%validator_factory..s!888ai8!)888rrrN )r%rrr updatejointype)namebases namespacer" docstringss rvalidator_factoryrYis$%%I }  E5 ! !# ) "88U888J :y 99)TYYz%:%:;<<< eY ' ''r) __future__r collectionsrcerberus.platformrrrrr r rr r%r+r)r7propertyr9rYrrrr^s&&&&&&""""""KKKKKKKKKKKKKK,.RSS4...***4AAAAAXAAA#'"((((((r