
    Mh
                        d dl Z d dlZd dlZd dlZd dlmZmZ d dlmZ  ej	                    dk    Z
ej        dd         dk    Zej        dd         dk    Zej        dd         dk    Zej        dd         d	k    Zej        dd         d
k    Zej        dd         dk    Zerd dlZej        Znd Z G d d          Z ej                    Zd ZdS )    N)MappingSequence)_GenericAliasPyPy   )   	   )r   
   )r      )r      )r      )r      c                 8    | j                             di           S )z,
        Get annotations for *cls*.
        __annotations__)__dict__get)clss    L/var/www/html/test/jupyter/venv/lib/python3.11/site-packages/attr/_compat.py_get_annotationsr      s     | 12666    c                   *    e Zd ZdZdgZd Zd Zd ZdS )_AnnotationExtractorz^
    Extract type annotations from a callable, returning None whenever there
    is none.
    sigc                 x    	 t          j        |          | _        d S # t          t          f$ r d | _        Y d S w xY w)N)inspect	signaturer   
ValueError	TypeError)selfcallables     r   __init__z_AnnotationExtractor.__init__+   sJ    	(22DHHHI& 	 	 	DHHHH	s    99c                     | j         sdS t          | j         j                                                  }|r+|d         j        t
          j        j        ur|d         j        S dS )zU
        Return the type annotation of the first argument if it's not empty.
        Nr   )r   list
parametersvalues
annotationr   	Parameterempty)r   paramss     r   get_first_param_typez)_AnnotationExtractor.get_first_param_type1   sb     x 	4dh)002233 	(fQi*'2C2III!9''tr   c                 f    | j         r)| j         j        t          j        j        ur| j         j        S dS )z;
        Return the return type if it's not empty.
        N)r   return_annotationr   	Signaturer(   )r   s    r   get_return_typez$_AnnotationExtractor.get_return_type>   s4    
 H	.*'2C2III8--tr   N)__name__
__module____qualname____doc__	__slots__r!   r*   r.    r   r   r   r   #   sT         
 I    
 
 
 
 
r   r   c                 0    | j         t          u r| j        S dS )zDIf this is a generic class (A[str]), return the generic base for it.N)	__class__r   
__origin__)cls    r   get_generic_baser9   Z   s    	|}$$}4r   )r   platformsys	threadingcollections.abcr   r   typingr   python_implementationPYPYversion_infoPY_3_9_PLUSPY_3_10_PLUSPY_3_11_PLUSPY_3_12_PLUSPY_3_13_PLUSPY_3_14_PLUSannotationlibget_annotationsr   r   localrepr_contextr9   r4   r   r   <module>rL      sw     



     - - - - - - - -             &x%''61rr"f,#w.#w.#w.#w.#w.  7$47 7 7% % % % % % % %h y      r   