U
    ±[ÖeÉ  ã                   @   s¼   d Z ddlZddlZddlmZmZ ddlmZ ddlm	Z	 ddl
mZ ddlmZ ejd dkZeorejd	 d
k Zejd dkZeZeZeZdd„ Zdd„ Zdd„ Zddd„Zdd„ ZdS )z°
    pyexcel._compact
    ~~~~~~~~~~~~~~~~~~~

    Compatibles

    :copyright: (c) 2014-2022 by Onni Software Ltd.
    :license: New BSD License, see LICENSE for more details
é    N)ÚBytesIOÚStringIO)Úrequest)Údedent)Úzip_longest)ÚOrderedDicté   é   é   é   c                 C   s   t | tƒot| tƒS )z$check if all member were string type)Ú
isinstanceÚtupleÚis_array_typeÚstr)Úan_array© r   úR/var/www/html/services/stratfitenv/lib/python3.8/site-packages/pyexcel/_compact.pyÚis_tuple_consists_of_strings$   s    r   c                    s   ‡ fdd„| D ƒ}t |ƒdkS )z)check if all members are of the same typec                    s   g | ]}t |ˆ ƒs|‘qS r   )r   )Ú.0Úi©Úatyper   r   Ú
<listcomp>+   s     
 z!is_array_type.<locals>.<listcomp>r   )Úlen)r   r   Útmpr   r   r   r   )   s    r   c                 C   s    | t krdS tr| tkrdS dS )z find out if a type is str or notTF)r   ÚPY2Úunicoder   r   r   r   Ú	is_string/   s    r   úDeprecated!c                    s   ‡ ‡fdd„}|S )zPrint deprecated messagec                     s   t  ˆt¡ ˆ | |ŽS )zPrint deperecated message)ÚwarningsÚwarnÚDeprecationWarning)ÚargÚkeywords©ÚfuncÚmessager   r   Úinner<   s    zdeprecated.<locals>.innerr   )r%   r&   r'   r   r$   r   Ú
deprecated9   s    r(   c                    s   ‡ fdd„}|S )Nc                    s   t | jƒd ˆ  | _| S )NÚ
)r   Ú__doc__)r%   ©Úvaluer   r   Ú_docE   s    zappend_doc.<locals>._docr   )r,   r-   r   r+   r   Ú
append_docD   s    r.   )r   )r*   Úsysr   Úior   r   Úurllibr   Útextwrapr   Ú	itertoolsr   Úcollectionsr   Úversion_infor   ZPY26ZPY3_AND_ABOVEÚobjectÚIteratorÚrangeZirangeÚzipZczipr   r   r   r(   r.   r   r   r   r   Ú<module>   s$   

