
    f                         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j                  dd dk\  Zej                  dk  r	 d dlmZ nd dlmZ erd dlZej0                  Znd Z G d d      Z ej6                         Zd Zy# e$ r eZY >w xY w)    N)MappingSequence)_GenericAliasPyPy   )      )r   	   )r   
   )r      )r      )r      )r      )Protocolc                 :    | j                   j                  di       S )z,
        Get annotations for *cls*.
        __annotations__)__dict__get)clss    G/var/www/cvtools/html/venv/lib/python3.12/site-packages/attr/_compat.py_get_annotationsr   %   s     || 1266    c                   (    e Zd ZdZdgZd Zd Zd Zy)_AnnotationExtractorz^
    Extract type annotations from a callable, returning None whenever there
    is none.
    sigc                 r    	 t        j                  |      | _        y # t        t        f$ r
 d | _        Y y w xY w)N)inspect	signaturer   
ValueError	TypeError)selfcallables     r   __init__z_AnnotationExtractor.__init__4   s4    	((2DHI& 	DH	s    66c                     | j                   syt        | j                   j                  j                               }|r8|d   j                  t
        j                  j                  ur|d   j                  S y)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_type:   s^     xxdhh))0023fQi**'2C2C2I2II!9'''r   c                     | j                   rF| j                   j                  t        j                  j                  ur| j                   j                  S y)z;
        Return the return type if it's not empty.
        N)r   return_annotationr   	Signaturer*   )r!   s    r   get_return_typez$_AnnotationExtractor.get_return_typeG   s<    
 HH**'2C2C2I2II88---r   N)__name__
__module____qualname____doc__	__slots__r#   r,   r0    r   r   r   r   ,   s    
 I
r   r   c                 @    | j                   t        u r| j                  S y)zDIf this is a generic class (A[str]), return the generic base for it.N)	__class__r   
__origin__)cls    r   get_generic_baser;   c   s    	||}$}}r   )r   platformsys	threadingcollections.abcr   r   typingr   python_implementationPYPYversion_infoPY_3_8_PLUSPY_3_9_PLUSPY_3_10_PLUSPY_3_11_PLUSPY_3_12_PLUSPY_3_13_PLUSPY_3_14_PLUStyping_extensionsr   ImportErrorobjectannotationlibget_annotationsr   r   localrepr_contextr;   r6   r   r   <module>rR      s<     
  -   &x%%'61r"f,r"f,#w.#w.#w.#w.#w. f.  $447% %h y U  s   D DD