B
    ÔùÓ`8  ã               @   s^   d dl mZ d dlmZ ddlZddlmZ ddlZG dd„ dƒZe	dƒe	d	ƒfZ
d
d„ ZdS )é   )ÚNUMERIC_TYPES)Úsafe_stringé    N)Úwrapsc               @   s   e Zd ZdS )Ú	DummyCodeN)Ú__name__Ú
__module__Ú__qualname__© r
   r
   ú</tmp/pip-unpacked-wheel-zhp1095k/openpyxl/compat/__init__.pyr      s   r   ó    Ú c                sL   t ˆ tƒr‡ fdd„}|S t ˆ ¡s.t ˆ ¡r8tdƒ‚ntttˆ ƒƒƒ‚d S )Nc                sT   t  ˆ¡rd‰ nd‰ tˆƒ‡ ‡‡fdd„ƒ}dˆ }|jrJ| j|7  _n||_|S )Nz+Call to deprecated class {name} ({reason}).z.Call to deprecated function {name} ({reason}).c                 s&   t jˆ jˆjˆd�tdd� ˆ| |ŽS )N)ÚnameÚreasoné   )ÚcategoryÚ
stacklevel)ÚwarningsÚwarnÚformatr   ÚDeprecationWarning)ÚargsÚkwargs)Úfmt1Úfunc1r   r
   r   Ú	new_func1   s
    z0deprecated.<locals>.decorator.<locals>.new_func1z

.. note::
    Deprecated: )ÚinspectÚisclassr   Ú__doc__)r   r   ZdeprecationNote)r   )r   r   r   Ú	decorator   s    
zdeprecated.<locals>.decoratorz'Reason for deprecation must be supplied)Ú
isinstanceÚstring_typesr   r   Ú
isfunctionÚ	TypeErrorÚreprÚtype)r   r   r
   )r   r   Ú
deprecated   s    

r&   )Znumbersr   Ústringsr   r   Ú	functoolsr   r   r   r%   r!   r&   r
   r
   r
   r   Ú<module>   s   