U
    Ú²g-  ã                   @  sf   d dl mZ d dlZd dlmZmZ ddlmZmZ dddœd	d
„Z	dddœdd„Z
G dd„ dƒZdS )é    )ÚannotationsN)ÚAnyÚNoReturné   )ÚStrOrBytesPathÚ	TypeGuardr   zTypeGuard[StrOrBytesPath])ÚfÚreturnc                 C  s   t | tttjfƒS ©N)Ú
isinstanceÚbytesÚstrÚosÚPathLike©r   © r   ú-/tmp/pip-unpacked-wheel-xela2va7/PIL/_util.pyÚis_path	   s    r   c                 C  s   t | ƒotj | ¡S )zCChecks if an object is a string, and that it points to a directory.)r   r   ÚpathÚisdirr   r   r   r   Úis_directory   s    r   c                   @  s>   e Zd Zddœdd„Zdddœdd	„Zedd
dœdd„ƒZdS )ÚDeferredErrorÚBaseException©Úexc                 C  s
   || _ d S r
   r   )Úselfr   r   r   r   Ú__init__   s    zDeferredError.__init__r   r   )Úeltr	   c                 C  s
   | j ‚d S r
   r   )r   r   r   r   r   Ú__getattr__   s    zDeferredError.__getattr__r   )r   r	   c                 C  s   t | ƒS )z‹
        Creates an object that raises the wrapped exception ``ex`` when used,
        and casts it to :py:obj:`~typing.Any` type.
        )r   r   r   r   r   Únew   s    zDeferredError.newN)Ú__name__Ú
__module__Ú__qualname__r   r   Ústaticmethodr   r   r   r   r   r      s   r   )Ú
__future__r   r   Útypingr   r   Ú_typingr   r   r   r   r   r   r   r   r   Ú<module>   s   