a
    i‚j]  ã                   @   s\   d Z ddlZddlmZmZmZ edƒZG dd„ deƒZejrXeegef edœdd„ZdS )	zPython 3.8+ backports.é    N)ÚAnyÚCallableÚTypeVarÚ_Tc                   @   s   e Zd ZdZddd„ZdS )Úcached_propertyz.Backport of py3.8 `functools.cached_property`.Nc                 C   sZ   |d u r| S | j d u rtdƒ‚d| j j }t||d ƒ}|d u rV|   |¡}t |||¡ |S )NzUnreadable attribute.Z	__cached_)ÚfgetÚAttributeErrorÚ__name__ÚgetattrÚobjectÚ__setattr__)ÚselfÚobjÚobjtypeÚattrÚcached© r   úQ/home/ghrups/robot-bench/.venv/lib/python3.9/site-packages/etils/epy/backports.pyÚ__get__   s    

zcached_property.__get__)N)r	   Ú
__module__Ú__qualname__Ú__doc__r   r   r   r   r   r      s   r   )ÚfnÚreturnc                 C   s   | d ƒS )Nr   )r   r   r   r   r   ,   s    )	r   Útypingr   r   r   r   Úpropertyr   ÚTYPE_CHECKINGr   r   r   r   Ú<module>   s   