�
J��g�! � � � d dl Z d dlZd dlZd dlZd dlZd dlZd dlZd dlZd dlZdZ d� Z
efd�Z dd�Z
d� Zd� Zd � Zd
� Zd� Zd� Zd
� Zd� Zd� Zd� Zd� ZdS )� NzApyarrow.{} is deprecated as of {}, please use pyarrow.{} instead.c � � �� � �fd�}|S )a�
A decorator that takes docstring templates, concatenates them, and finally
performs string substitution on them.
This decorator will add a variable "_docstring_components" to the wrapped
callable to keep track of the original docstring template for potential future use.
If the docstring is a template, it will be saved as a string.
Otherwise, it will be saved as a callable and the docstring will be obtained via
the __doc__ attribute.
This decorator cannot be used on Cython classes due to a CPython constraint,
which enforces the __doc__ attribute to be read-only.
See https://github.com/python/cpython/issues/91309
Parameters
----------
*docstrings : None, str, or callable
The string / docstring / docstring template to be prepended in order
before the default docstring under the callable.
**params
The key/value pairs used to format the docstring template.
c � �� g }�D ]a}|��t |d� � r|� |j � � �0t |t � � s|j r|� |� � �b| j r,|� t j | j � � � � �fd�|D � � }d� d� |D � � � � | _ || _ | S )N�_docstring_componentsc �~ �� g | ]9}t |t � � r t �� � d k r
|j di ���n|��:S )r � )�
isinstance�str�len�format)�.0� component�paramss ��\/home/asafur/pinokio/api/open-webui.git/app/env/lib/python3.11/site-packages/pyarrow/util.py�
<listcomp>z*doc.<locals>.decorator.<locals>.<listcomp>L sg �� �
�
�
� � �)�S�)�)�
�.1�&�k�k�A�o�o�
�I��&�&�v�&�&�&��
�
�
� � c �r � g | ]4}t |t � � r|nt j |j pd � � ��5S )r )r r �textwrap�dedent�__doc__)r r
s r r z*doc.<locals>.decorator.<locals>.<listcomp>T sR � �
�
�
� � �i��-�-�>� � ��_�Y�%6�%<�"�=�=�
�
�
r )
�hasattr�extendr r r r �appendr r �join)� decorated�docstring_components� docstring�params_applied�
docstringsr s ��r � decoratorzdoc.<locals>.decorator: s0 �� �!�� $� 7� 7�I�� ���y�"9�:�:�
7�$�+�+��3�� � � � �I�s�+�+�
7�y�/@�
7�$�+�+�I�6�6�6�� �� L� �'�'��� �8I�(J�(J�K�K�K�
�
�
�
� 2�
�
�
�� �G�G�
�
� "0�
�
�
�
�
� ��
!� �'� �r r )r r r s `` r �docr! $ s+ ��� �,%� %� %� %� %� %�N �r c �R ���� t � | ||� � ����fd�}|S )Nc �>