o
    oo™iS  ã                   @   sJ   d Z ddlZddlZddlZddlmZ ddgZdZG dd„ dejƒZ	dS )	z(Encoding parameter handling and default.é    Né   )ÚcopyingÚDEFAULT_ENCODINGÚEncodingzutf-8c                       sv   e Zd ZdZeZedœdeje ddf‡ fdd„Z	‡ fdd	„Z
edefd
d„ƒZejdeje ddfdd„ƒZ‡  ZS )r   z<Encoding used for input and output with ``'utf-8'`` default.)Úencodingr   ÚreturnNc                   s   t ƒ jdi |¤Ž || _d S )N© )ÚsuperÚ__init__r   )Úselfr   Úkwargs©Ú	__class__r   úE/home/ubuntu/.local/lib/python3.10/site-packages/graphviz/encoding.pyr
      s   
zEncoding.__init__c                    s   t ƒ jdd| ji|¤ŽS )z3Return the kwargs to create a copy of the instance.r   Nr   )r	   Ú_copy_kwargsÚ	_encoding)r   r   r   r   r   r      s   zEncoding._copy_kwargsc                 C   s   | j S )z'The encoding for the saved source file.)r   )r   r   r   r   r      s   zEncoding.encodingc                 C   s$   |d u rt  ¡ }t |¡ || _d S )N)ÚlocaleÚgetpreferredencodingÚcodecsÚlookupr   )r   r   r   r   r   r   #   s   

)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r   ÚtypingÚOptionalÚstrr
   r   Úpropertyr   ÚsetterÚ__classcell__r   r   r   r   r      s    ÿ")
r   r   r   r   Ú r   Ú__all__r   ÚCopyBaser   r   r   r   r   Ú<module>   s    