o
    JÎµiÙ
  ã                   @   s>   d dl Zd dlmZ ejG dd„ dƒƒZdedefdd„ZdS )	é    N)Údumpsc                   @   sŒ   e Zd ZU dZdZeed< 	 dZee ed< 	 dZ	eed< 	 dZ
eed< dZeed< dZeed	< dZeed
< dZeed< dd„ Zdd„ ZdS )ÚConfigz}
    SudachiPy rich configuration object.

    Fields passed here will override the fields in the default configuration.
    NÚsystemÚuserÚsurfaceÚ
projectionÚconnectionCostPluginÚoovProviderPluginÚpathRewritePluginÚinputTextPluginÚcharacterDefinitionFilec                 C   s   t tt | ¡ƒƒS )z?
        Convert this Config object to the json string
        )Ú_dumpsÚ_filter_nullsÚ_dataclassesÚasdict)Úself© r   úD/home/ubuntu/.local/lib/python3.10/site-packages/sudachipy/config.pyÚas_jsons@   s   zConfig.as_jsonsc                 K   s   t j| fi |¤ŽS ©N)r   Úreplace)r   Úchangesr   r   r   ÚupdateF   s   zConfig.update)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   ÚstrÚ__annotations__r   Úlistr   r   r	   r
   r   r   r   r   r   r   r   r   r      s   
 	r   ÚdataÚreturnc                 C   s0   t |  ¡ ƒ}|D ]}| | }|d u r| |= q| S r   )r   Úkeys)r    r"   ÚkeyÚvr   r   r   r   J   s   €r   )	Údataclassesr   Újsonr   r   Ú	dataclassr   Údictr   r   r   r   r   Ú<module>   s
   7