�
u��g�
� � � d dl Z d dlZd dlZd dlZd dlmZmZ d dlmZ ej � � dk Z
ej dd� dk Zej dd� dk Z
ej dd� dk Zej dd� d k Zej dd� d
k Zej dd� dk Zerd dlZej Znd� Z G d
� d� � Z ej � � Zd� ZdS )� N)�Mapping�Sequence)�
_GenericAlias�PyPy� )� � )r �
)r � )r � )r �
)r � c �8 � | j � di � � S )z,
Get annotations for *cls*.
�__annotations__)�__dict__�get)�clss �\/home/asafur/pinokio/api/open-webui.git/app/env/lib/python3.11/site-packages/attr/_compat.py�_get_annotationsr s � � �|��� 1�2�6�6�6� c �* � e Zd ZdZdgZd� Zd� Zd� ZdS )�_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 xY w)N)�inspect� signaturer �
ValueError� TypeError)�self�callables r �__init__z_AnnotationExtractor.__init__+ sJ � � ��(��2�2�D�H�H�H���I�&� � � ��D�H�H�H�H� ���s � �9�9c �� � | j sdS t | j j � � � � � }|r+|d j t
j j ur
|d j S dS )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��d�h�)�0�0�2�2�3�3��� (�f�Q�i�*�'�2C�2I�I�I��!�9�'�'��tr c �f � | j r)| j j t j j ur| j j S dS )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>