a
    »ÏOc¤  ã                   @   sR   d dl Z ddlmZ ddlmZ er2d dlmZ nd dlmZ G dd„ deƒZdS )é    Né   )ÚPY2)Úunicode)Ú	lru_cachec                       s¶   e Zd Z‡ fdd„Zejej d ZdZejd Z	dZ
dZe
e Zedd	�d
d„ ƒZedd	�dd„ ƒZedd	�dd„ ƒZedd	�dd„ ƒZedd	�dd„ ƒZedd	�dd„ ƒZ‡  ZS )ÚTOMLCharc                    s&   t t| ƒ ¡  t| ƒdkr"tdƒ‚d S )Nr   z$A TOML character must be of length 1)Úsuperr   Ú__init__ÚlenÚ
ValueError)ÚselfÚc©Ú	__class__© úH/var/www/html/gsl.tools/lib/python3.9/site-packages/tomlkit/toml_char.pyr      s    zTOMLChar.__init__z-_z= 	z+-_.ez 	z
N)Úmaxsizec                 C   s
   | | j v S )zH
        Whether the character is a valid bare key name or not.
        )ÚBARE©r   r   r   r   Úis_bare_key_char   s    zTOMLChar.is_bare_key_charc                 C   s
   | | j v S )zN
        Whether the character is a valid key/value separator ot not.
        )ÚKVr   r   r   r   Ú	is_kv_sep"   s    zTOMLChar.is_kv_sepc                 C   s
   | | j v S )z[
        Whether the character if a valid integer or float value character or not.
        )ÚNUMBERr   r   r   r   Úis_int_float_char)   s    zTOMLChar.is_int_float_charc                 C   s
   | | j v S )zI
        Whether the character is a whitespace character or not.
        )ÚWSr   r   r   r   Úis_ws0   s    zTOMLChar.is_wsc                 C   s
   | | j v S )zG
        Whether the character is a new line character or not.
        )ÚNLr   r   r   r   Úis_nl7   s    zTOMLChar.is_nlc                 C   s
   | | j v S )z9
        Whether the character is a space or not
        )ÚSPACESr   r   r   r   Ú	is_spaces>   s    zTOMLChar.is_spaces)Ú__name__Ú
__module__Ú__qualname__r   ÚstringÚascii_lettersÚdigitsr   r   r   r   r   r   r   r   r   r   r   r   r   Ú__classcell__r   r   r   r   r      s&   





r   )r"   Ú_compatr   r   Zfunctools32r   Ú	functoolsr   r   r   r   r   Ú<module>   s   