Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes14kdownloads
functools.cpython-314.pyc249 linesDownload Raw Back to __pycache__
1+
2��i)���:�Rt.R=Ot^RIHt^RIHt^RIHt^RIH	t	^R	I3HtHtH
t
Ht^R4IHtR>tR?t]]3Rlt]]3RltR
tRtRtRtRtRtRtRtRtRtRtRt RR]3R]3R]3.RR]3R]3R]3.RR]3R]3R]3.RR]3R]3R] 3./t!Rt"Rt#^RI$H#t#]&!4t']'3R lt(!R!R"4t)])!4t*R#t+R$t,R%t-!R&R4t.^R'I$H.t.H*t*H)t)!R(R4t/R)t0R*t1]!R+.R@O4t2]&!43]3]40]5]6]73R,lt8RAR-lt9R.t:^R/I$H:t:R0t;R1t<RBR3lt=R4t>R5t?R6t@!R7R4tA!R8R94tB]&!4tC!R:R4tDR;tE]E!](4t(AE^R<I$H(t(R2# ]%dL�i;i ]%dL�i;i ]%dLqi;i ]%dR2#i;i)CzEfunctools.py - Tools for working with functions and callable objects5�partial�
partialmethod�singledispatchmethod�cached_property)�get_cache_token)�6namedtuple)�7itemgetter)�recursive_repr)�GenericAlias�8MethodType�MappingProxyType�	UnionType)�RLockc���VFp\W4p\WV4K	VF'p\W4P\W/44K)	WnV# \dKbi;i)a�Update a wrapper function to look like the wrapped function9 10wrapper is the function to be updated11wrapped is the original function12assigned is a tuple naming the attributes assigned directly13from the wrapped function to the wrapper function (defaults to14functools.WRAPPER_ASSIGNMENTS)15updated is a tuple naming the attributes of the wrapper that16are updated with the corresponding attribute from the wrapped17function (defaults to functools.WRAPPER_UPDATES)18)�getattr�setattr�AttributeError�update�__wrapped__)�wrapper�wrapped�assigned�updated�attr�values&&&&  �Lib\functools.py�update_wrapperr#sp����	*��G�*�E�
�G�5�)�
������%�%�g�g�R�&@�A��"���N���	��	�s�A�A&�%A&c�&�\\VWR7#)adDecorator factory to apply update_wrapper() to a wrapper function19 20Returns a decorator that invokes update_wrapper() with the decorated21function as the wrapper argument and the arguments to wraps() as the22remaining arguments. Default arguments are as for update_wrapper().23This is a convenience function to simplify applying partial() to24update_wrapper().25�rrr)rrrs&&&r�wrapsrAs���>�7�$�7�7�c�t�\V4PW4pV\JdV#V'*;'dW8g#)zIReturn a > b.  Computed by @total_ordering from (not a < b) and (a != b).��type�__lt__�NotImplemented��self�other�	op_results&& r�_gt_from_ltr*Y�6���T�26�!�!�$�.�I��N�"����=�*�*�T�]�*r c�j�\V4PW4pV\JdV#T;'gW8H#)zEReturn a <= b.  Computed by @total_ordering from (a < b) or (a == b).r"r&s&& r�_le_from_ltr-`�4���T�27�!�!�$�.�I��N�"����%�%��
�%r c�\�\V4PW4pV\JdV#V'*#)z=Return a >= b.  Computed by @total_ordering from (not a < b).r"r&s&& r�_ge_from_ltr0g�,���T�28�!�!�$�.�I��N�"����=�r c�t�\V4PW4pV\JdV#V'*;'gW8H#)zJReturn a >= b.  Computed by @total_ordering from (not a <= b) or (a == b).�r#�__le__r%r&s&& r�_ge_from_ler5n�6���T�29�!�!�$�.�I��N�"����=�)�)�D�M�)r c�j�\V4PW4pV\JdV#T;'dW8g#)zFReturn a < b.  Computed by @total_ordering from (a <= b) and (a != b).r3r&s&& r�_lt_from_ler8u�4���T�30�!�!�$�.�I��N�"����&�&���&r c�\�\V4PW4pV\JdV#V'*#)z=Return a > b.  Computed by @total_ordering from (not a <= b).r3r&s&& r�_gt_from_ler;|r1r c�t�\V4PW4pV\JdV#V'*;'dW8g#)zIReturn a < b.  Computed by @total_ordering from (not a > b) and (a != b).�r#�__gt__r%r&s&& r�_lt_from_gtr?�r+r c�j�\V4PW4pV\JdV#T;'gW8H#)zEReturn a >= b.  Computed by @total_ordering from (a > b) or (a == b).r=r&s&& r�_ge_from_gtrA�r.r c�\�\V4PW4pV\JdV#V'*#)z=Return a <= b.  Computed by @total_ordering from (not a > b).r=r&s&& r�_le_from_gtrC�r1r c�t�\V4PW4pV\JdV#V'*;'gW8H#)zJReturn a <= b.  Computed by @total_ordering from (not a >= b) or (a == b).�r#�__ge__r%r&s&& r�_le_from_gerG�r6r c�j�\V4PW4pV\JdV#T;'dW8g#)zFReturn a > b.  Computed by @total_ordering from (a >= b) and (a != b).rEr&s&& r�_gt_from_gerI�r9r c�\�\V4PW4pV\JdV#V'*#)z=Return a < b.  Computed by @total_ordering from (not a >= b).rEr&s&& r�_lt_from_gerK�r1r r$r>r4rFc	��\Uu0uF&p\WR4\\VR4JgK$VkK(	ppV'g\R4h\	V4p\V,FwrEWB9gK
WEn\
WV4K!	V#uupi)z6Class decorator that fills in missing ordering methodsNz6must define at least one ordering operation: < > <= >=)�_convertr�object�31ValueError�max�__name__r)�cls�op�roots�root�opname�opfuncs&     r�total_orderingrX�s��#�^�(�B�g�c�t�&<�G�F�TV�X\�D]�&]�R�R�(�E�^���Q�R�R��u�:�D�"�4�.�.�����$�O��C��(�)��J��
_s32�!B�Bc�,a�!V3RlR\4pV#)z,Convert a cmp= function into a key= functionc�n<a�]tRt^�toR.tRtV3RltV3RltV3RltV3Rlt	V3Rlt33RtR	tVt
R#)34zcmp_to_key.<locals>.K�objc��WnR#�N�r[)r'r[s&&r�__init__�cmp_to_key.<locals>.K.__init__�s���Hr c�D<�S!VPVP4^8#��r^�r'r(�mycmps&&�rr$�cmp_to_key.<locals>.K.__lt__���������5�9�9�-��1�1r c�D<�S!VPVP4^8�#rbr^rds&&�rr>�cmp_to_key.<locals>.K.__gt__�rgr c�D<�S!VPVP4^8H#rbr^rds&&�r�__eq__�cmp_to_key.<locals>.K.__eq__���������5�9�9�-��2�2r c�D<�S!VPVP4^8*#rbr^rds&&�rr4�cmp_to_key.<locals>.K.__le__�rmr c�D<�S!VPVP4^8�#rbr^rds&&�rrF�cmp_to_key.<locals>.K.__ge__�rmr Nr^)rQ�35__module__�__qualname__�__firstlineno__�	__slots__r_r$r>rkr4rF�__hash__�__static_attributes__�__classdictcell__)�
__classdict__res@�r�K�cmp_to_key.<locals>.K�s/�����G�	�	�	2�	2�	3�	3�	3��r rz)rN)rerzsf r�36cmp_to_keyr|�s����F��
�Hr )r|c��\V4pV\Jd\V4pMTpVFpV!WE4pK
	V# \d\	R4Rhi;i)a�37reduce(function, iterable, /[, initial]) -> value38 39Apply a function of two arguments cumulatively to the items of an iterable, from left to right.40 41This effectively reduces the iterable to a single value.  If initial is present,42it is placed before the items of the iterable in the calculation, and serves as43a default when the iterable is empty.44 45For example, reduce(lambda x, y: x+y, [1, 2, 3, 4, 5])46calculates ((((1 + 2) + 3) + 4) + 5).47z0reduce() of empty iterable with no initial valueN)�iter�_initial_missing�next�
StopIteration�	TypeError)�function�sequence�initial�itr�elements&&&   r�reducer��so��48�h��B��"�"�	N���H�E�49������(����L���	N��B�D�IM�
N�	N�s	�8�Ac�Da�]tRtRtoRtRtRtRtRtRt	Rt50RtVtR#)	�_PlaceholderTypeizUThe type of the Placeholder singleton.51 52Used as a placeholder for partial arguments.53Nc�4�\RVPR24h)ztype 'z ' is not an acceptable base type)r�rQ)rR�args�kwargss&*,r�__init_subclass__�"_PlaceholderType.__init_subclass__s���&�����.N�O�P�Pr c�j�VPf\PV4VnVP#r])�_PlaceholderType__instancerN�__new__�rRs&rr��_PlaceholderType.__new__s&���>�>�!�#�^�^�C�0�C�N��~�~�r c��R#��Placeholder��r's&r�__repr__�_PlaceholderType.__repr__!���r c��R#r�r�r�s&r�54__reduce__�_PlaceholderType.__reduce__$r�r r�)
rQrrrsrt�__doc__r�rur�r�r�r�rwrx�rys@rr�r�s0������J��I�Q��55��r r�c��V'gR#\V4p.pTp\V4F<wrEV\JdVPV4V^,
pK+VPV4K>	W1,56pV'd57\	V!MRpWg3#)rcN)rcN)�len�	enumerater��appendr)r��nargs�order�j�i�a�phcount�mergers&       r�_partial_prepare_mergerr�)ss�������I�E��E�
�A��$��������L�L��O�
��F�A��L�L��O� ��i�G�#*�Z��
��F��?�r c��\V\4'd$\p\V4'g\R4hM9\p\V4'g#\VR4'g\RV:R24hV'dVR,\Jd\R4hVP4FpV\JgK\R4h	\W4'd�VPpVPpV'dmWr,
pV'dO\V4pW�8dV\3Wh,58,,
pVPV4pW�8�dWrVR,
p\V4wr�MYaPr�/VPCVCpVPpMTp\V4wr�\ P#V4pWnW{n59W;nW�n	W�nV#)z#the first argument must be callable�__get__zthe first argument z# must be a callable or a descriptor�%trailing Placeholders are not allowedz2Placeholder cannot be passed as a keyword argumentN�����)�60issubclassr�callabler�r�hasattrr��values�61isinstance�_phcountr�r��_mergerr��keywords�funcrNr�)rRr�r�r��base_clsr�pto_phcount�tot_argsr�r�r�r's""*,        r�_partial_newr�9s����#�w�������~�~��A�B�B��!����~�~�g�d�I�&>�&>��1�$��:.�.�/�
/���R��K�'��?�@�@����"���K���P�Q�Q�#��$�!�!��m�m���9�9�����H���D�	���&����+�2E� F�F�H��<�<��1���&��[�\� 2�2�H�5�h�?�O�G�V�)�<�<�V�0�d�m�m�0�x�0���y�y����1�(�;����>�>�#��D��I��I��M��M��L��Kr c�Z�\V4pVPpVPp\VP4.pVP\
\VP44VPRVPP444VRVRRPV4R2#)c3�6"�TFwrVRV:2x�K	R#5i)�=Nr�)�.0�k�vs&  r�	<genexpr>� _partial_repr.<locals>.<genexpr>ms���?�)>���1�#�Q�q�e��)>�s��.�(z, �))r#rrrs�reprr��extend�mapr�r��items�join)r'rR�module�qualnamer�s&    r�
_partial_reprr�gs���62�t�*�C�
�^�^�F����H�����O��D��K�K��D�$�)�)�$�%��K�K�?����)<�)<�)>�?�?��X�Q�x�j��$�)�)�D�/�!2�!�4�4r c�ra�]tRtRtoRtR	t]t]!4!]	4t63RtR64RltRt
Rt]!]4tRtVtR#)riqzKNew function with partial application of the given arguments65and keywords.66c	�2�VPpV'd)VPVPV,4pWRpMVPp/VPCVCpVP!.VOVO5/VB# \d\	RTR\T424hi;i)NzBmissing positional arguments in 'partial' call; expected at least �, got �r�r�r��67IndexErrorr�r�r�r�)r'r�r�r��pto_argss"*,  r�__call__�partial.__call__|s����-�-���
H��<�<��	�	�D�(8�9���H�~���y�y�H�0�d�m�m�0�x�0���y�y�6�(�6�T�6�X�6�6���
H��!,�,3�9�F�3�t�9�+�!G�H�H�
H�s�&A0�0&BNc�$�VfV#\W4#r])r)r'r[�objtypes&&&rr��partial.__get__�s���;��K��$�$�$r c��\V4VP3VPVPVP;'gRVP;'gR33#r])r#r�r�r��__dict__r�s&rr��partial.__reduce__�sI���D�z�D�I�I�<�$�)�)�T�Y�Y��}�}�$�$��d�m�m�&;�&;�t�*=�=�	=r c��\V\4'g\R4h\V4^8wd\R\V424hVwr#rE\	V4'dK\V\4'd5Ve\V\684'dVe"\V\694'g\R4hV'dVR,\Jd\R4h\V4wrg\V4pVf/pM\V4\70Jd\V4pVf/pWPn	W n71W0nW@nW`n
WpnR#)z(argument to __setstate__ must be a tuplezexpected 4 items in state, got Nzinvalid partial stater�r�)r��tupler�r�r��dictr�r�r#r�r�r�r�r�r�)r'�stater�r��kwds�	namespacer�r�s&&      r�__setstate__�partial.__setstate__�s���%��'�'��F�G�G��u�:��?��=�c�%�j�\�J�K�K�&+�#��D�����j��u�&=�&=���Z��d�%;�%;��!�*�Y��*E�*E��3�4�4��D��H��+��C�D�D�1�$�7����T�{���<��D�
�$�Z�t�
#���:�D����I�!�
��	��	��
��
��r )r�r�r�r�r�r�)r�r�r�r�r�r��__weakref__r])rQrrrsrtr�rur�r�r	r�r�r�r�r�r��classmethodr72�__class_getitem__rwrxr�s@rrrqsF�����,�I��G���
�.�H�
7�%�73=��<$�L�1�r )rr�r�c�\a�]tRtRtoRt]t]tRt	RRlt74]R4t]
!]4tRtVtR#)	ri�z�Method descriptor with partial application of the given arguments75and keywords.76 77Supports wrapping existing descriptors and handles non-descriptor78callables as instance methods.79c�Da�V3RlpSPVnSVnV#)c	�6<�SPpV'd)SPSPV,4pWRpMSPp/SPCVCpSP!V.VOVO5/VB# \d\	RTR\T424hi;i)NzHmissing positional arguments in 'partialmethod' call; expected at least r�r�)�cls_or_selfr�r�r�r�r's"*,  �r�_method�3partialmethod._make_unbound_method.<locals>._method�s�����m�m�G��L�#�|�|�D�I�I��,<�=�H���>�D� �9�9��4�$�-�-�4�8�4�H��9�9�[�G�8�G�d�G�h�G�G��"�L�#�%0�07�y��s�4�y�k�%K�L�L�L�s�&A2�2&B)�__isabstractmethod__�__partialmethod__)r'r�sf r�_make_unbound_method�"partialmethod._make_unbound_method�s&���
	H�(,�'@�'@��$�$(��!��r Nc�@�\VPRR4pRpVeMV!W4pWPPJd6\V.VPO5/VPBpVP80VnVf VP4PW4pV# \dL2i;i)r�N)	rr�rr�r��__self__rr�r�)r'r[rR�get�result�new_funcs&&&   rr��partialmethod.__get__�s����d�i�i��D�1�����?��3�}�H��y�y�(�!��G�D�I�I�G����G���&.�&7�&7�F�O��>��.�.�0�8�8��B�F��
��
&����s�B�B�Bc�0�\VPRR4#�r�F�rr�r�s&rr��"partialmethod.__isabstractmethod__�����t�y�y�"8�%�@�@r r�r])rQrrrsrtr�r�r�r�r�r�r��propertyr�r�r81r�rwrxr�s@rrr�sC������G��H��&�&�A��A�$�L�1�r c�N�\V\4'dVPpK$V#r])r�rr��r�s&r�_unwrap_partialr�s��82�T�7�83#�84#��y�y���Kr c���RpWJdcTp\\VRR4\4'dVPpK/\V\4'd\VR4pK$\	V4pKgV#)Nr�r�)r�rrr�r)r��prevs& r�_unwrap_partialmethodr�s\���D�85�86������':�D�A�=�Q�Q��)�)�D���}�-�-��4��(�D��t�$���Kr �	CacheInfoc��a�TpV'd(W�,
pVP4Fp	W�,
pK
	V'd�Y�;QJd.V3RlV4FNK	5M!V3RlV44,
pV'dQY�;QJd%.V3RlVP44FNK	5M!V3RlVP444,
pV#V!V4^8XdS!V^,4V9d87V^,#V#)ayMake a cache key from optionally typed positional and keyword arguments88 89The key is constructed in a way that is flat as possible rather than90as a nested structure that would take more memory.91 92If there is only a single argument and its data type is known to cache93its hash value, then that argument is returned without a wrapper.  This94saves space and improves lookup speed.95 96c3�4<"�TF
pS!V4x�K	R#5ir]r��r�r�r#s& �rr��_make_key.<locals>.<genexpr>"s����+�d��T�!�W�W�d���c3�4<"�TF
pS!V4x�K	R#5ir]r�r97s& �rr�r$s����8�-�Q��a���-�r)r�r�)98r�r��typed�kwd_mark�	fasttypesr�r#r��key�items99&&&&&&f&  r�	_make_keyr100s����$�C������J�J�L�D��K�C�!���u�+�d�+�u�u�+�d�+�+�+����5�8�$�+�+�-�8�5�5�8�$�+�+�-�8�8�8�C��J�101
�S��Q��4��A��<�9�4��1�v�
��Jr c� aa�\S\4'dS^8d^oMd\S4'dE\S\4'd/S^�upo\	VSS\1024pVV3RlVn\W24#Se\R4hVV3RlpV#)a�Least-recently-used cache decorator.103 104If *maxsize* is set to None, the LRU features are disabled and the cache105can grow without bound.106 107If *typed* is True, arguments of different types will be cached separately.108For example, f(decimal.Decimal("3.0")) and f(3.0) will be treated as109distinct calls with distinct results. Some types such as str and int may110be cached separately even when typed is false.111 112Arguments to the cached function must be hashable.113 114View the cache statistics named tuple (hits, misses, maxsize, currsize)115with f.cache_info().  Clear the cache and statistics with f.cache_clear().116Access the underlying function with f.__wrapped__.117 118See:  https://en.wikipedia.org/wiki/Cache_replacement_policies#Least_recently_used_(LRU)119 120c�<�RSRS/#��maxsizerr�rs��r�<lambda>�lru_cache.<locals>.<lambda>K����Y���%�,Pr z=Expected first argument to be an integer, a callable, or Nonec�V<�\VSS\4pVV3RlVn\W4#)c�<�RSRS/#rr�rs��rr�8lru_cache.<locals>.decorating_function.<locals>.<lambda>Srr )�_lru_cache_wrapper�121_CacheInfo�cache_parametersr)�
user_functionrrrs& ��r�decorating_function�&lru_cache.<locals>.decorating_functionQs&���$�]�G�U�J�O��#P�� ��g�5�5r )	r��intr��boolrrr rr�)rrr!rr"sff   r�	lru_cacher&)s����4�'�3����Q�;��G��	�'�	�	�z�%��6�6�!(�#��
�w�$�]�G�U�J�O��#P�� ��g�5�5�	�	��K�M�	M�6�122�r c�raaaaaaa	a123aaa
aaaaaaa�\4o\oR	wo	ooo124/o^;ooRoSPoSPo
\	4o.oSSRR.SR&S^8Xd	VV3RlpM'SfVVVVVVVV3RlpMVVV	V125VVV
VVVVVVVVV3RlpVV
VVVV3RlpVVVVVV3RlpWTnWdnV#)126rcFN�NNNc�*<�S^,
oS!V/VBpV#��r�)r�r�r��missesr!s*, ��rr�#_lru_cache_wrapper.<locals>.wrapperis"���
�a�K�F�"�D�1�D�1�F��Mr c�z<�S!WS1274pS!VS	4pVS	JdS^,
oV#S^,
oS!V/VBpVSV&V#r*r�)r�r�rr��cache�	cache_get�hits�make_keyr,�sentinelrr!s*,  ��������rrr-rsY����4�u�-�C��s�H�-�F��X�%���	���
��a�K�F�"�D�1�D�1�F��E�#�J��Mr c�H<�S!WS4pS;_uu_4S!V4pVe?VwrErgWTS
&WES&SS,pV;VS
&SS&W�S&SVS
&S^,
oVuuRRR4#S^,
oRRR4S!V/VBpS;_uu_4VS9dMgS'd9Sp	W)S&WyS&V	S
,oSS,p128SS,pR;SS&SS&SV129V	SV&M'SS,pVSW'.pV;VS
&;SS&SV&S!4S8�oRRR4V# +'giL�;i +'giT#;ir]r�)r�r�r�link�	link_prev�	link_next�_keyr��last�oldroot�oldkey�	oldresult�KEY�NEXT�PREV�RESULTr/r0�	cache_len�fullr1�lockr2rr,rUrr!s*,          ����������������rrr-�sk����4�u�-�C��� ��~���#�9=�6�I�$�&/�d�O�&/�d�O���:�D�.2�2�D��J��d��!%��J�!%�D��J��A�I�D�!����!����#�D�1�D�1�F����%�<�130��"�G�#&�C�L�&,�F�O�#�4�=�D�!�#�Y�F� $�V��I�/3�3�D��I��V���f�
�")�E�#�J� ��:�D� �$��4�D�;?�?�D��J�?��d��e�C�j�&�K�7�2�D�G�H�M�g�����H�M�s%�AC=� 	C=�D�AD�=D
	�D!	c	�v<�S;_uu_4S!SSSS!44uuRRR4# +'giR#;i)zReport cache statisticsNr�)rrAr1rCrr,s������r�131cache_info�&_lru_cache_wrapper.<locals>.cache_info�s$���
�T��d�F�G�Y�[�A��T�T�T�s�'�8	c�<�S;_uu_4SP4SSRR.SR&^;ooRoRRR4R# +'giR#;i)z$Clear the cache and cache statisticsNr(F)�clear)r/rBr1rCr,rUs������r�cache_clear�'_lru_cache_wrapper.<locals>.cache_clear�s@����T��K�K�M��T�4��.�D��G���D�6��D�	�T�T�T�s	� 6�A	)rcr+��)rNrr��__len__rrErI)r!rrrrrErIr=r>r?r@r/r0rArBr1rCr2r,rUr3sffff   @@@@@@@@@@@@@@rrrXs�������x�H��H�(��D�$��V��E���D�6��D��	�	�I��
�
�I��7�D�
�D��T�4��&�D��G��!�|�	�132��	�	�7	�7	�7	�rB�B�133��$��%���Nr )rc�&�\RR7!V4#)z@Simple lightweight unbounded cache.  Sometimes called "memoize".N)r)r&)r!s"rr/r/�s���T�"�=�1�1r c�0�.pVUu.uFq"'gKVNK	ppV'gV#VF'pV^,pVFpWER,9gKRpK%	M	Xf\R4hVPV4VFpV^,V8XgKV^K	K�uupi)z|Merges MROs in *sequences* to a single MRO using the C3 algorithm.134 135Adapted from https://docs.python.org/3/howto/mro.html.136 137:r+NNNzInconsistent hierarchy)�RuntimeErrorr�)�	sequencesr��s�s1�	candidate�s2�seqs&      r�	_c3_mergerW�s����F�138� )�/�	�1�Q�Q�Q�	�	�/���M��B��1��I����2��&� $�I�� �139�����7�8�8��
�
�i� ��C��1�v��"���F���0s140�	B�BNc�a�\\VP44F6wpo\SR4'gK\	VP4V,141pM	^pV'd\V4M.p\VPRV4p.p\VPVR4pVF~o\
VS4'gK\;QJd)V3RlVP4F'gKRM	RM!V3RlVP44'dKmVPS4K�	VFoVPS4K	VUu.uFp\WqR7NK	ppVUu.uFp\WqR7NK	p	pVUu.uFp\WqR7NK	p142p\V..V,V	,V143,V.,V.,V.,4#uupiuupiuupi)aSComputes the method resolution order using extended C3 linearization.144 145If no *abcs* are given, the algorithm works exactly like the built-in C3146linearization used for method resolution.147 148If given, *abcs* is a list of abstract base classes that should be inserted149into the resulting MRO. Unrelated ABCs are ignored and don't end up in the150result. The algorithm inserts ABCs where their functionality is introduced,151i.e. issubclass(cls, abc) returns True for the class itself but returns152False for all its direct base classes. Implicit ABCs for a given class153(either registered or inferred from the presence of a special method like154__len__) are inserted directly after the last ABC explicitly listed in the155MRO of said class. If two implicit ABCs end up next to each other in the156resulting MRO, their ordering depends on the order of types in *abcs*.157 158�__abstractmethods__Nc3�<<"�TFp\VS4x�K	R#5ir])r�)r��b�bases& �rr��_c3_mro.<locals>.<genexpr>s����-�-:��159�1�d�#�#�]�s�TF��abcs)r��reversed�	__bases__r�r��listr��anyr��remove�_c3_mrorW)rRr_r��boundary�explicit_bases�abstract_bases�other_basesr\�explicit_c3_mros�abstract_c3_mros�
other_c3_mross&&     `   rrere�s����"�X�c�m�m�4�5���4��4�.�/�/��3�=�=�)�A�-�H��6�160���4��:�2�D��#�-�-�	��2�3�N��N��s�}�}�X�Y�/�0�K����c�4� � ���-�-0�]�]�-����-�-0�]�]�-�*�*�161
�!�!�$�'�
������D���=K�L�^�T���0�^��L�=K�L�^�T���0�^��L�:E�F�+�$�W�T�-�+�M�F��162
����	�+�	,�.;�	<�	��	�*�+�	,�/:�m�	<����M��L��Fs�G� G�;Gc	��aaa�\SP4oVV3RlpSUu.uFq2!V4'gKVNK	upoV3RlpSUu.uFq4!V4'dKVNK	upo\S4p.pSF�p.pVP4FSp	V	S9gK\SV	4'gK TP	V	PU163u.uF
q�V9gKV164NK	up1654KU	V'gVP	V4K�VP\RR7VF%p	V	FpW�9gKVP	V4K	K'	K�	\SVR7#uupiuupiuup166i)z�Calculates the method resolution order for a given class *cls*.167 168Includes relevant abstract base classes (with their respective bases) from169the *types* iterable. Uses a modified C3 linearization algorithm.170 171c�<�VS9;'d>\VR4;'d*\V\4'*;'d
\SV4#��__mro__)r�r�r172r�)�typ�basesrRs&��r�173is_related� _compose_mro.<locals>.is_related0sN����5� �:�:�W�S�)�%<�:�:�)3�C��)F�%F�:�:�%/��S�%9�	;r c�P<�SFpW8wgKWP9gKR#	R#)TFro)rqr(�typess& �r�is_strict_base�$_compose_mro.<locals>.is_strict_base7s#����E��|��}�}� 4���r T)r�reverser^)�setrp�__subclasses__r�r��sortr�re)
rRrvrs�nrw�type_set�mrorq�found�subrR�subclsrrs
ff          @r�_compose_mror�'s-���
�����E�;��/��1��A��Q�Q��/�E��174�7��1�^�A�%6�Q�Q��7�E��5�z�H�175�C������%�%�'�C��%��J�s�C�$8�$8�������F��A�X�
�a�a��F�G�(���J�J�s�O��
�176�177�s�D�178�)��C����$��J�J�v�&�����3�S�!�!��7
0��
8��Gs"�E�E�E�E�E�Ec�.�\WP44pRpVFdpVeTWA9dLW@P9d<W0P9d,\W44'g\	RPW444hMWA9gKbTpKf	VP
V4#)aJReturns the best matching implementation from *registry* for type *cls*.179 180Where there is no registered implementation for a specific type, its method181resolution order is used to find a more generic implementation.182 183Note: if *registry* does not contain an implementation for the base184*object* type, this function may return None.185 186NzAmbiguous dispatch: {} or {})r��keysrpr�rP�formatr�)rR�registryr�match�ts&&   r�187_find_implr�Qs����s�M�M�O�188,�C��E�
�����
�!�;�;�"6�"'�{�{�":�&0��&:�&:�"�#A�#H�#H��$�����=��E���<�<���r c� aaaaaaa	�^RIp/o	VP4oRoVVV	3RloRoRVVVVV	3RlloVV3Rlp\VRR4oVS	\&SVnSVn\
S	4VnSPVn	\W 4V#)	aSSingle-dispatch generic function decorator.189 190Transforms a function into a generic function, which can have different191behaviours depending upon the type of its first argument. The decorated192function acts as the default implementation, and additional193implementations can be registered using the register() attribute of the194generic function.195Nc��<�Se$\4pSV8wdSP4VoSV,pV# \d2ST,pM \d\TS4pMi;iTST&T#i;i)z�generic_func.dispatch(cls) -> <function implementation>196 197Runs the dispatch algorithm to return the best available implementation198for the given *cls* registered on *generic_func*.199 200)rrH�KeyErrorr�)rR�
current_token�impl�cache_token�dispatch_cacher�s&  ���r�dispatch� singledispatch.<locals>.dispatch}s�����"�+�-�M��m�+��$�$�&�+��	'�!�#�&�D����
�	'�
1���}����
1�!�#�x�0��
1��"&�N�3����
	'�s3�	5�A1�	A�201A1�A%�"A1�$A%�%A1�0A1c���\V\4'dR#\V\4;'dI\;QJd&RVP4F'dKR#	R#!RVP44#)Tc3�B"�TFp\V\4x�K	R#5ir])r�r#)r��args& rr��Bsingledispatch.<locals>._is_valid_dispatch_type.<locals>.<genexpr>�s���B�\�c�J�s�D�)�)�\�s�F)r�r#r
�all�__args__r�s&r�_is_valid_dispatch_type�/singledispatch.<locals>._is_valid_dispatch_type�sd���c�4� � ���3�	�*�C�C���B�S�\�\�B���	D��	D��B�S�\�\�B�B�	Dr c	��<a�S!S4'd
VfVV3Rl#M�Ve\RS:R24h\SRR4pVf\RS:R24hSp^RIHp^R	IHpHp\\V!WPR2027P444wpoS!S4'ge\S\4'd\RV:RS:R
24h\SV4'd\RV:RS:R24h\RV:RS:R24h\S\4'dSPFpVSV&K203	MVSS&S	f\SR4'd\4o	S204P!4V#)zsgeneric_func.register(cls, func) -> func205 206Registers a new implementation for the given *cls* on a *generic_func*.207 208Nc�<�S!SV4#r]r�)�frR�registers&��rr�2singledispatch.<locals>.register.<locals>.<lambda>�s����#�q�!1r z(Invalid first argument to `register()`. z is not a class or union type.�__annotate__z(Invalid first argument to `register()`: zS. Use either `@register(some_class)` or plain `@register` on an annotated function.)�get_type_hints)�Format�209ForwardRef)r�zInvalid annotation for z. z not all arguments are classes.z$ is an unresolved forward reference.z is not a class.rY)r�r�typingr��
annotationlibr�r�r�r~�210FORWARDREFr�r�r
r�r�rrH)
rRr��annr�r�r��argnamer�r�r�r�r�r�s
f&      �����rr�� singledispatch.<locals>.register�s����#�3�'�'��|�1�1�����>��g�;�=����#�~�t�4�C��{��>�s�g�F0�1���211�D�
.�8���^�D�AR�AR�%S�%Y�%Y�%[� \�]�L�G�S�*�3�/�/��c�9�-�-�#�1�'��B��'�!@�B��� ��Z�0�0�#�1�'��B��'�!E�G���212$�1�'��B��'�!1�3���213�c�9�%�%��|�|�� $���
�$�!�H�S�M���7�3�0E�#F�#F�)�+�K������r c�n<�V'g\SR24hS!V^,P4!V/VB#)�( requires at least 1 positional argument)r��	__class__)r��kwr��funcnames*,��rr�singledispatch.<locals>.wrapper�s@�����x�j�)4�4�5�
5���Q��)�)�*�D�7�B�7�7r rQzsingledispatch functionr])�weakref�WeakKeyDictionaryrrNr�r�rr�rH�_clear_cacher)214r�r�rr�r�r�r�r�r�r�s215&  @@@@@@@r�singledispatchr�ks������H��.�.�0�N��K��.D�6�6�p8��t�Z�)B�C�H��H�V���G���G��'��1�G��)�/�/�G���7�!��Nr c�Ta�]tRtRtoRtRtR216RltR217Rlt]R4t	Rt218R	tVtR#)ri�zTSingle-dispatch generic method descriptor.219 220Supports wrapping existing descriptors.221c��\V4'g"\VR4'g\V:R24h\V4VnWnR#)r�z  is not callable or a descriptorN)r�r�r�r��222dispatcherr��r'r�s&&rr_�singledispatchmethod.__init__�s;����~�~�g�d�I�&>�&>��t�h�&F�G�H�H�(��.����	r Nc�:�VPPWR7#)zvgeneric_method.register(cls, func) -> func223 224Registers a new implementation for the given *cls* on a *generic_method*.225r)r�r�)r'rR�methods&&&rr��singledispatchmethod.register�s��226���'�'��'�9�9r c��\WV4#r])�_singledispatchmethod_get)r'r[rRs&&&rr��singledispatchmethod.__get__�s��(��C�8�8r c�0�\VPRR4#r�r�r�s&rr��)singledispatchmethod.__isabstractmethod__�r�r c��VPPpRTR2# \d/TPPpL* \dRpL:i;ii;i)�?z#<single dispatch method descriptor �>)r�rsrrQ�r'�names& rr��singledispatchmethod.__repr__�s`��	��9�9�)�)�D�5�T�F�!�<�<���	�
��y�y�)�)���!�
���
��	�s&��A�A�
A�A�A�A)r�r�r])
rQrrrsrtr�r_r�r�rr�r�rwrxr�s@rrr�s9�����227�:�9��A��A�=�=r c�Xa�]tRtRtoRtRtRtRt]R4t	]R4t228RtVtR	#)229r�ic��WnVPPVnW nW0nVPpVPVnVPVn	R# \dL!i;i \dR#i;ir])230�_unboundr�r��	_dispatch�_obj�_clsr�rrrr�)r'�unboundr[rRr�s&&&& rr_�"_singledispatchmethod_get.__init__	sv���
� �+�+�4�4����	��	��|�|��	�"�o�o�D�O�	��<�<�D�L���	��	���	��	�s#�A �
A1� A.�-A.�1B�?Bc���VPpTPeRTRTP:R2#RTR2# \d%TPpLB \dRpLRi;ii;i)r�z<bound single dispatch method z of r�z<single dispatch method )rsrrQr�r�s& rr��"_singledispatchmethod_get.__repr__sy��	��$�$�D��9�9� �3�D�6��d�i�i�]�!�L�L�-�d�V�1�5�5���	�
��}�}���!�
���
��	�s'�6�A%�A�
A!�A%� A!�!A%c��V'g0\VPPRR4p\VR24hVP	V^,P2314P
VPVP4!V/VB#)rQzsingledispatchmethod methodr�)	rr�r�r�r�r�r�r�r�)r'r�r�r�s"*, rr��"_singledispatchmethod_get.__call__'su����t�}�}�1�1�:�<�>�H��x�j�)4�4�5�
5��~�~�d�1�g�/�/�0�8�8����D�I�I�N�PT�_�X^�_�_r c�\�VR9d\h\VPPV4#)rQ>rQrs�__annotations__�__type_params__r�)rrr�r�r�s&&r�__getattr__�%_singledispatchmethod_get.__getattr__/s.���>�>� � ��t�}�}�)�)�4�0�0r c�.�VPP#r])r�r�r�s&rr�%_singledispatchmethod_get.__wrapped__7s���}�}�!�!�!r c�.�VPP#r])r�r�r�s&rr��"_singledispatchmethod_get.register;s���}�}�%�%�%r )r�rrr�r�r�r�N)
rQrrrsrtr_r�r�r�rrr�rwrxr�s@rr�r�sB�����"6�`�1��"��"��&��&r r�c�Fa�]tRtRtoRtRtRRlt]!]4t	Rt232VtR#)riFc�d�WnRVnVPVnVPVnR#r])r��attrnamer�rrr�s&&rr_�cached_property.__init__Gs$���	���
��|�|����/�/��r c��VPf	W nR#W P8wd\RVP:RV:R24hR#)Nz?Cannot assign the same cached_property to two different names (z and z).)r�r�)r'�ownerr�s&&&r�__set_name__�cached_property.__set_name__MsI���=�=� � �M�
�]�]�
"����M�M�$�E�$���5��
�#r Nc��VfV#VPf\R4hVPpTP
TP\4pT\Jd#TPT4pYSTP&T#T# \d6R\	T4P233:RTP:R2p\T4Rhi;i \d6R\	T4P234:RTP:R2p\T4Rhi;i)NzGCannot use cached_property instance without calling __set_name__ on it.zNo '__dict__' attribute on z instance to cache z235 property.zThe '__dict__' attribute on z7 instance does not support item assignment for caching )	r�r�r�rr#rQr��236_NOT_FOUNDr�)r'�instancer�r/�msg�vals&&&   rr��cached_property.__get__Vs�����K��=�=� ��Y�[�
[�	+��%�%�E��i�i��
�
�z�2���*���)�)�H�%�C�
/�'*�d�m�m�$��237�s�238��#�	+�-�d�8�n�.E�.E�-H�I%�%)�]�]�$5�Z�A�
��C�.�d�*�	+���
/�2�4��>�3J�3J�2M�ND�DH�M�M�CT�T^�`�� ��n�$�.�
/�s�A;�)B>�;AB;�>AC>)r�rrr�r�r])rQrrrsrtr_r�r�r�r239r�rwrxr�s@rrrFs!����*���6$�L�1�r c�0a�\S4V3Rl4pV#)c�<�RV9gRV9d?^RIp^RIpVPR\VPP\43R7S!V/VB#)r�r�Nz�Calling functools.reduce with keyword arguments "function" or "sequence" is deprecated in Python 3.14 and will be forbidden in Python 3.16.)�skip_file_prefixes)�os�warnings�warn�DeprecationWarning�path�dirname�__file__)r�r�r�r��	py_reduces*,  �rr�+_warn_python_reduce_kwargs.<locals>.wrappertsY������:��#7����M�M�,�#�$&�G�G�O�O�H�$=�#?�

�
A��$�)�&�)�)r )r)r�rsf r�_warn_python_reduce_kwargsr�ss!���240�9��*��*��Nr )r�)rr�WRAPPER_ASSIGNMENTS�WRAPPER_UPDATESrXr/r|r&r�rrr�rrr�)rrrQrsr�r�r�)r�)r1r,r�currsize)�Fr])Fr��__all__�abcr�collectionsr�operatorr�reprlibr	rvr241rrr
�_threadrr�r�rrr*r-r0r5r8r;r?rArCrGrIrKrMrXr|�242_functools�ImportErrorrNrr�r�r�r�r�r�rrrrrr$�strr�r#r�rr&rr/rWrer�r�r�rr�r�rr�r�r r�<module>rs����-��243 �"��"�G�G��:����2�,��>)�#�7�0+�&��*�'��+�&��*�'��
��+�&��+�&��+�&�(�
��+�&��+�&��+�&�(�
��+�&��+�&��+�&�(�
��+�&��+�&��+�&�(�
���$
�&	�%��8��'7��H��,� ��� ,�\5�A2�A2�H	�A�A�24442�42�r�245	���%N�
O�246� ����s���t���>-�^r�h	�-�2��6+�Z("�T�4t�p#=�#=�J5&�5&�x�X�247�+2�+2�Z� 248$�F�	+���	�!��Q�	��	��h�	��	��n�	��	��|
�	��	�sH�E(�249E5�F� F�(E2�1E2�5E?�>E?�F�F�F�F
codekingpro/portable-devtools · Team Ai