o
    èÅbÊ  ã                   @  sÈ   d dl m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
 ejdkr.d dlmZ nd dlmZ edƒZ	 eeed	d
f Z	 G dd„ deƒZG dd„ deƒZG dd„ deƒZG dd„ deƒZdS )é    )ÚannotationsN)ÚTypeVarÚUnion)ÚAbstractPen)ÚAbstractPointPen)é   é   )ÚProtocolÚTzos.PathLike[str]zos.PathLike[bytes]c                   @  ó   e Zd ZdZd	dd„ZdS )
ÚDrawablez†Stand-in for an object that can draw itself with a given pen.

    See :mod:`fontTools.pens.basePen` for an introduction to pens.
    Úpenr   ÚreturnÚNonec                 C  ó   d S ©N© ©Úselfr   r   r   ú0/usr/lib/python3/dist-packages/ufoLib2/typing.pyÚdraw   ó   zDrawable.drawN)r   r   r   r   )Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r   r   r   r   r      ó    r   c                   @  r   )
ÚDrawablePointsz‘Stand-in for an object that can draw its points with a given pen.

    See :mod:`fontTools.pens.pointPen` for an introduction to point pens.
    r   r   r   r   c                 C  r   r   r   r   r   r   r   Ú
drawPoints'   r   zDrawablePoints.drawPointsN)r   r   r   r   )r   r   r   r   r   r   r   r   r   r   !   r   r   c                   @  s   e Zd ZU dZded< dS )ÚHasIdentifierzxAny object that has a unique identifier in some context that can be
    used as a key in a public.objectLibs dictionary.z
str | NoneZ
identifierN)r   r   r   r   Ú__annotations__r   r   r   r   r   +   s   
 r   c                   @  s$   e Zd ZdZddd„Zdd
d„ZdS )ÚGlyphSeta  Any container that holds drawable objects.

    In ufoLib2, this usually refers to :class:`.Font` (referencing glyphs in the
    default layer) and :class:`.Layer` (referencing glyphs in that particular layer).
    Ideally, this would be a simple subclass of ``Mapping[str, Union[Drawable, DrawablePoints]]``,
    but due to historic reasons, the established objects don't conform to ``Mapping``
    exactly.

    The protocol contains what is used in :mod:`fontTools.pens` at v4.18.2
    (grep for ``.glyphSet``).
    ÚnameÚobjectr   Úboolc                 C  r   r   r   ©r   r"   r   r   r   Ú__contains__@   r   zGlyphSet.__contains__ÚstrúDrawable | DrawablePointsc                 C  r   r   r   r%   r   r   r   Ú__getitem__C   r   zGlyphSet.__getitem__N)r"   r#   r   r$   )r"   r'   r   r(   )r   r   r   r   r&   r)   r   r   r   r   r!   2   s    
r!   )Z
__future__r   ÚosÚsysÚtypingr   r   ZfontTools.pens.basePenr   ZfontTools.pens.pointPenr   Úversion_infor	   Ztyping_extensionsr
   r'   ÚbytesÚPathLiker   r   r   r!   r   r   r   r   Ú<module>   s"    


