
    sh                     \    S SK Jr  / SQr " S S\5      rS r " S S\5      r " S S	\S
9rg)   )typename)VariadicSignatureType
isvariadicVariadicSignatureMetaVariadicc                   &    \ rS rSrS rS rS rSrg)r      c                    ^  [        U5      (       a  UR                  OU4nUT L =(       d    [        U 4S jU 5       5      $ )Nc              3   P   >#    U  H  n[        UTR                  5      v   M     g 7fN)
issubclassvariadic_type).0otherclss     ڏ/Users/tiagomarins/Projetos/claudeai/copy_bank/venv/lib/python3.13/site-packages/torch/fx/experimental/unification/multipledispatch/variadic.py	<genexpr>:VariadicSignatureType.__subclasscheck__.<locals>.<genexpr>   s(      &
# uc//00#s   #&)r   r   all)r   subclass
other_types   `  r   __subclasscheck__'VariadicSignatureType.__subclasscheck__
   sA    /9(/C/CX++(
3 
# &
#&
 #
 	
    c                 |    [        U5      =(       a+    [        U R                  5      [        UR                  5      :H  $ )z
Return True if other has the same variadic type
Parameters
----------
other : object (type)
    The object (type) to check
Returns
-------
bool
    Whether or not `other` is equal to `self`
)r   setr   )r   r   s     r   __eq__VariadicSignatureType.__eq__   s/     % WS):):%;s5CVCV?W%WWr   c                 T    [        [        U 5      [        U R                  5      45      $ r   )hashtype	frozensetr   )r   s    r   __hash__VariadicSignatureType.__hash__   s!    T#Y	#*;*; <=>>r    N)__name__
__module____qualname____firstlineno__r   r   r#   __static_attributes__r%   r   r   r   r      s    
X?r   r   c                 "    [        U [        5      $ )a   Check whether the type `obj` is variadic.
Parameters
----------
obj : type
    The type to check
Returns
-------
bool
    Whether or not `obj` is variadic
Examples
--------
>>> # xdoctest: +SKIP
>>> isvariadic(int)
False
>>> isvariadic(Variadic[int])
True
)
isinstancer   )objs    r   r   r   #   s    $ c011r   c                       \ rS rSrSrS rSrg)r   8   zA metaclass that overrides ``__getitem__`` on the class. This is used to
generate a new type for Variadic signatures. See the Variadic class for
examples of how this behaves.
c           	          [        U[        [        45      (       d  [        U5      (       d  [        S5      e[        U[        5      (       d  U4n[	        S[        U5       S3S[        USS95      $ )NzVVariadic types must be type or tuple of types (Variadic[int] or Variadic[(int, float)]z	Variadic[]r%   )r   	__slots__)r,   r!   tuple
ValueErrorr   r   dict)r   r   s     r   __getitem__!VariadicSignatureMeta.__getitem__>   sr    =4-88D<O<O< 
 -//*,M$/02};
 	
r   r%   N)r&   r'   r(   r)   __doc__r6   r*   r%   r   r   r   r   8   s    

r   r   c                       \ rS rSrSrSrg)r   N   a.  A class whose getitem method can be used to generate a new type
representing a specific variadic signature.
Examples
--------
>>> # xdoctest: +SKIP
>>> Variadic[int]  # any number of int arguments
<class 'multipledispatch.variadic.Variadic[int]'>
>>> Variadic[(int, str)]  # any number of one of int or str arguments
<class 'multipledispatch.variadic.Variadic[(int, str)]'>
>>> issubclass(int, Variadic[int])
True
>>> issubclass(int, Variadic[(int, str)])
True
>>> issubclass(str, Variadic[(int, str)])
True
>>> issubclass(float, Variadic[(int, str)])
False
r%   N)r&   r'   r(   r)   r8   r*   r%   r   r   r   r   N   s    r   r   )	metaclassN)utilsr   __all__r!   r   r   r   r   r%   r   r   <module>r>      s:     W?D ?62*
D 
,. r   