
    hQ                        S SK r S SKrS SKrS SKrS SKJrJr  S SKJrJ	r	J
r
JrJrJrJr  SrS SKJr  \" S\\\4   S9r\\/\4   r\ SSS	S
.SSS\S\S\4S jjj5       r\SS	S
.S\S\S\S\4S jj5       r SSS	S
.S\
\   S\S\S\\\4   4S jjjr\ SSS	S
.SSS\S\S\4S jjj5       r\SS	S
.S\S\S\S\4S jj5       r SSS	S
.S\
\   S\S\S\\\4   4S jjjrS\S\S\S\4S jrS rS rS\S\	\	\      4S jrS rg)    N)	FrameTypeFunctionType)CallableListOptionalTupleTypeVarUnionoverloadz7.7.0)ensure_signature_is_compatible_WrappedMethod)boundTFcheck_signaturecheck_at_runtimemethodr   r   returnc                    g N r   r   r   s      fC:\Users\julio\OneDrive\Documentos\Trabajo\Ideas Frescas\venv\Lib\site-packages\overrides/overrides.py	overridesr                c                    g r   r   r   s      r   r   r   *   r   r   c                T    U b  [        XU5      $ [        R                  " [        UUS9$ )a  Decorator to indicate that the decorated method overrides a method in
superclass.
The decorator code is executed while loading class. Using this method
should have minimal runtime performance implications.

How to use:
from overrides import overrides

class SuperClass(object):
    def method(self):
      return 2

class SubClass(SuperClass):

    @overrides
    def method(self):
        return 1

:param check_signature: Whether or not to check the signature of the overridden method.
:param check_at_runtime: Whether or not to check the overridden method at runtime.
:raises AssertionError: if no match in super classes for the method name
:return: method with possibly added (if the method doesn't have one)
    docstring from super class
r   
_overrides	functoolspartialr   r   s      r   r   r   4   4    < &3CDD  +-
 	
r   c                    g r   r   r   s      r   overrider$   \   r   r   c                    g r   r   r   s      r   r$   r$   f   r   r   c                T    U b  [        XU5      $ [        R                  " [        UUS9$ )a  Decorator to indicate that the decorated method overrides a method in
superclass.
The decorator code is executed while loading class. Using this method
should have minimal runtime performance implications.

How to use:
from overrides import override

class SuperClass(object):
    def method(self):
      return 2

class SubClass(SuperClass):

    @override
    def method(self):
        return 1

:param check_signature: Whether or not to check the signature of the overridden method.
:param check_at_runtime: Whether or not to check the overridden method at runtime.
:raises AssertionError: if no match in super classes for the method name
:return: method with possibly added (if the method doesn't have one)
    docstring from super class
r   r   r   s      r   r$   r$   p   r"   r   c                   ^ ^^ [        T SS5        [        T SS 5      nUc&  [        [        R                  T R
                     5      n[        [        R                  " S5      U5       H[  m[        TT R                  5      (       d  M   U(       a%  [        R                  " T 5      UU U4S j5       nUs  $ [        T TT5        T s  $    [        T R                   S35      e)N__override__T__globals__   c                  .   > [        TTT5        T" U 0 UD6$ r   )_validate_method)argskwargsr   r   super_classs     r   wrapper_overrides.<locals>.wrapper   s    $V[/J!42622r   z: No super class method found)setattrgetattrvarssysmodules
__module___get_base_classes	_getframehasattr__name__r    wrapsr,   	TypeError__qualname__)r   r   r   global_varsr0   r/   s   ``   @r   r   r      s    
 FND)&-6K3;;v'8'89:(q)9;G;00(3 )3  oF H v**++HI
JJr   c                    [        XR                  5      n[        [        R                  " XR                  5      [
        5      n[        USS5      (       a  [        U R                   SU 35      eU R                  (       d  UR                  U l        U(       aD  U R                  R                  S5      (       d#  [        U[        5      (       d  [        X0U5        g g g g )N	__final__Fz: is finalized in __)r3   r;   
isinstanceinspectgetattr_staticstaticmethodr=   __doc__
startswithpropertyr   )r   r/   r   super_method	is_statics        r   r,   r,      s    ;8L{OO<lI |[%006??++=k]KLL>>%--**400<22&|YG 3 1 	r   c                 V    [        U 5       Vs/ s H  n[        X!5      PM     sn$ s  snf r   )_get_base_class_names_get_base_class)frame	namespaceclass_name_componentss      r   r8   r8      s5     &;5%A%A! 	-9%A  s   &rO   c                 ,   / n/ nSn[         R                  " U R                  5       H  nUR                  U R                  :  a    OUR
                  [         R                  ;  a  M?  U(       d  / nSnUR                  S;   a'  U(       a  UR                  U5        UR                  /nM  UR                  S:X  a$  U(       a  UR                  UR                  5        M  U(       a  UR                  U5        / nSnM     U(       a  UR                  U5        U$ )z(Get baseclass names from the code objectT)	LOAD_NAMELOAD_GLOBAL	LOAD_ATTRF)
disget_instructionsf_codeoffsetf_lastiopcodehasnameopnameappendargval)rO   current_itemitemsadd_last_stepinstructions        r   rM   rM      s     LEM++ELL9-S[[0E M !==\*'../L;.< 2 23 \*L!M/ :2 \"Lr   c                      XS      nU SS   H   n[	        X#5      (       d  M  [        X#5      nM"     U$ ! [          a:    [        US   [        5      (       a  US   U S      n NZ[        US   U S   5      n Nnf = f)Nr   __builtins__   )KeyErrorrC   dictr3   r:   )
componentsrP   obj	components       r   rN   rN      s    D1&  ^	3""#)C $ J  Di/66N+JqM:C)N3Z]CC	Ds   4 -A8#A87A8r   )rV   r    rD   r5   typesr   r   typingr   r   r   r   r	   r
   r   __VERSION__overrides.signaturer   r   _DecoratorMethodboolr   r$   r   r,   r8   strrM   rN   r   r   r   <module>rs      s_  "    
 ) L L L >)|X7M1NO^,n<=  
 !"	  	
  
 
 !"	  	
  
 (,%
 !"	%
^$%
 %
 	%

 ^+,%
P 
 !"	  	
  
 
 !"	  	
  
 (,%
 !"	%
^$%
 %
 	%

 ^+,%
PKKK K 	K2H"! !tDI !Hr   