Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes14kdownloads
overrides.cpython-313.pyc99 linesDownload Raw Back to __pycache__
1�

2x�jQ���SSKrSSKrSSKrSSKrSSKJrJr SSKJrJ	r	J3r4JrJrJ
r
Jr SrSSKJr \"S\
\\4S9r\\/\4r\SSS	S5.SSS\S
\S\4Sjjj5r\SS	S6.S\S\S
\S\4Sjj5rSSS	S7.S\8\S\S
\S\
\\44Sjjjr\SSS	S9.SSS\S
\S\4Sjjj5r\SS	S10.S\S\S
\S\4Sjj5rSSS	S11.S\12\S\S
\S\
\\44SjjjrS\S\S
\S\4SjrSrSrS\S\	\	\4SjrSrg)�N)�	FrameType�FunctionType)�Callable�List�Optional�Tuple�TypeVar�Union�overloadz7.7.0)�ensure_signature_is_compatible�_WrappedMethod)�boundTF��check_signature�check_at_runtime�methodrr�returnc��g�N��rrrs   �YD:\code\apps\devtools\python\user_packages\Python313\site-packages\overrides/overrides.py�	overridesr ����c��grrrs   rrr*rrc�T�Ub[XU5$[R"[UUS9$)a�Decorator to indicate that the decorated method overrides a method in13superclass.14The decorator code is executed while loading class. Using this method15should have minimal runtime performance implications.16 17How to use:18from overrides import overrides19 20class SuperClass(object):21    def method(self):22      return 223 24class SubClass(SuperClass):25 26    @overrides27    def method(self):28        return 129 30:param check_signature: Whether or not to check the signature of the overridden method.31:param check_at_runtime: Whether or not to check the overridden method at runtime.32:raises AssertionError: if no match in super classes for the method name33:return: method with possibly added (if the method doesn't have one)34    docstring from super class35r��36_overrides�	functools�partialrrs   rrr4�4��<���&�3C�D�D�� � ��+�-�37�	38rc��grrrs   r�overrider$\rrc��grrrs   rr$r$frrc�T�Ub[XU5$[R"[UUS9$)a�Decorator to indicate that the decorated method overrides a method in39superclass.40The decorator code is executed while loading class. Using this method41should have minimal runtime performance implications.42 43How to use:44from overrides import override45 46class SuperClass(object):47    def method(self):48      return 249 50class SubClass(SuperClass):51 52    @override53    def method(self):54        return 155 56:param check_signature: Whether or not to check the signature of the overridden method.57:param check_at_runtime: Whether or not to check the overridden method at runtime.58:raises AssertionError: if no match in super classes for the method name59:return: method with possibly added (if the method doesn't have one)60    docstring from super class61rrrs   rr$r$pr"rc�^^^�[TSS5 [TSS5nUc&[[RTR625n[
[R"S5U5H[m[TTR5(dM U(a%[R"T5UUU4Sj5nUs $[TTT5 Ts $ [TRS35e)N�__override__T�__globals__�c�.>�[TTT5 T"U0UD6$r)�_validate_method)�args�kwargsrr�super_classs  ���r�wrapper�_overrides.<locals>.wrapper�s���$�V�[�/�J�!�4�2�6�2�2rz: No super class method found)�setattr�getattr�vars�sys�modules�63__module__�_get_base_classes�	_getframe�hasattr�__name__r �wrapsr,�	TypeError�__qualname__)rrr�global_varsr0r/s``   @rrr�s����64�F�N�D�)��&�-��6�K����3�;�;�v�'8�'8�9�:��(����q�)9�;�G���;����0�0������(�3�)�3��� ���o�F��
�H��v�*�*�+�+H�I�65J�Jrc��[XR5n[[R"XR5[665n[USS5(a[
URSU35eUR(dURUlU(aDURRS5(d#[U[5(d
[X0U5 gggg)N�	__final__Fz: is finalized in �__)r3r;�67isinstance�inspect�getattr_static�staticmethodr=�__doc__�68startswith�propertyr)rr/r�super_method�	is_statics     rr,r,�s����;���8�L�����{�O�O�<�l��I��|�[�%�0�0��6�?�?�+�+=�k�]�K�L�L��>�>�%�-�-�������*�*�4�0�0��<��2�2�&�|�Y�G�3�1�	rc�V�[U5Vs/sHn[X!5PM sn$s snfr)�_get_base_class_names�_get_base_class)�frame�	namespace�class_name_componentss   rr8r8�s5��&;�5�%A��%A�!�	�-�9�%A����s�&rOc�,�/n/nSn[R"UR5H�nURUR:�a O�UR69[R;aM?U(d/nSnURS;a'U(aURU5 UR/nM�URS:Xa$U(aURUR5 M�U(aURU5 /nSnM� U(aURU5 U$)z(Get baseclass names from the code objectT)�	LOAD_NAME�LOAD_GLOBAL�	LOAD_ATTRF)70�dis�get_instructions�f_code�offset�f_lasti�opcode�hasname�opname�append�argval)rO�current_item�items�
add_last_step�instructions     rrMrM�s��� �L��E��M��+�+�E�L�L�9������
�
�-�����S�[�[�0����E� �M����!=�=�����\�*�'�.�.�/�L�
�
�
�;�
.�<����� 2� 2�3�����\�*��L�!�M�/:�2�
���\�"��Lrc���XSnUSSH n[	X#5(dM[X#5nM" U$![a: [US[5(a
USUSnNZ[USUS5nNnf=f)Nr�__builtins__�)�KeyErrorrC�dictr3r:)�71componentsrP�obj�	components    rrNrN�s���D��1�
�&�� ���^�	��3�"�"��#�)�C�$��J���D��i��/��6�6��N�+�J�q�M�:�C��)�N�3�Z��]�C�C�	D�s�4�-A8�#A8�7A8r)rVr rDr5�typesrr�typingrrrrr	r72r�__VERSION__�overrides.signaturerr
�_DecoratorMethod�boolrr$rr,r8�strrMrNrrr�<module>rss_��"���73�)�L�L�L���>��)��|�X�7M�1N�O���^�,�n�<�=��74���!�"�	������	�75��76��77�!�"�	������	�78��79��(,�%80�!�"�	%81��^�$�%82��%83��	%84�85��^�+�,�%86�P87���!�"�	������	�88��89��90�!�"�	������	�91��92��(,�%93�!�"�	%94��^�$�%95��%96��	%97�98��^�+�,�%99�PK��K��K��K��	K�2H�"�!��!�t�D��I��!�Hr
codekingpro/portable-devtools · Team Ai