HEX
Server: Apache
System: Linux 185.122.168.184.host.secureserver.net 5.14.0-570.52.1.el9_6.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Oct 15 06:39:08 EDT 2025 x86_64
User: barbeatleanalyti (1024)
PHP: 8.1.33
Disabled: NONE
Upload Files
File: //var/opt/nydus/ops/attr/__pycache__/_compat.cpython-39.pyc
a

�,�h�
�@s�ddlZddlZddlZddlZddlmZmZddlmZe�	�dkZ
ejdd�dkZejdd�dkZ
ejdd�dkZejdd�d	kZejdd�d
kZejdd�dkZer�ddlZejZndd
�ZGdd�d�Ze��Zdd�ZdS)�N)�Mapping�Sequence)�
_GenericAlias�PyPy�)��	)r�
)r�)r�)r�
)r�cCs|j�di�S)z,
        Get annotations for *cls*.
        �__annotations__)�__dict__�get)�cls�r�=/opt/nydus/tmp/pip-target-wkfpz8uv/lib/python/attr/_compat.py�_get_annotationssrc@s.eZdZdZdgZdd�Zdd�Zdd�Zd	S)
�_AnnotationExtractorz^
    Extract type annotations from a callable, returning None whenever there
    is none.
    �sigc	Cs2zt�|�|_Wnttfy,d|_Yn0dS)N)�inspect�	signaturer�
ValueError�	TypeError)�self�callablerrr�__init__+sz_AnnotationExtractor.__init__cCs>|js
dSt|jj���}|r:|djtjjur:|djSdS)zU
        Return the type annotation of the first argument if it's not empty.
        Nr)r�list�
parameters�values�
annotationr�	Parameter�empty)r�paramsrrr�get_first_param_type1s
z)_AnnotationExtractor.get_first_param_typecCs"|jr|jjtjjur|jjSdS)z;
        Return the return type if it's not empty.
        N)r�return_annotationr�	Signaturer#)rrrr�get_return_type>s��z$_AnnotationExtractor.get_return_typeN)�__name__�
__module__�__qualname__�__doc__�	__slots__rr%r(rrrrr#s

rcCs|jtur|jSdS)zDIf this is a generic class (A[str]), return the generic base for it.N)�	__class__r�
__origin__)Zclrrr�get_generic_baseZs
r0)r�platform�sys�	threading�collections.abcrr�typingr�python_implementationZPYPY�version_infoZPY_3_9_PLUSZPY_3_10_PLUSZPY_3_11_PLUSZPY_3_12_PLUSZPY_3_13_PLUSZPY_3_14_PLUSZ
annotationlibZget_annotationsrr�localZrepr_contextr0rrrr�<module>s&4