????

Your IP : 18.116.170.100


Current Path : /opt/cloudlinux/venv/lib/python3.11/site-packages/iniconfig/__pycache__/
Upload File :
Current File : //opt/cloudlinux/venv/lib/python3.11/site-packages/iniconfig/__pycache__/__init__.cpython-311.pyc

�

�܋fa���dZddlmZddlmZmZmZmZmZm	Z	m
Z
mZmZm
Z
mZmZddlZerddlmZgd�ZddlmZdd	lmZdd
lmZmZe	d��Ze	d��ZGd
�d��ZGd�d��ZdS)ze brain-dead simple parser for ini-style files.
(C) Ronny Pfannschmidt, Holger Krekel -- MIT licensed
�)�annotations)�Callable�Iterator�Mapping�Optional�Tuple�TypeVar�Union�
TYPE_CHECKING�NoReturn�
NamedTuple�overload�castN)�Final)�	IniConfig�
ParseError�COMMENTCHARS�
iscommentline�)r)�_parse)rr�_D�_Tc���eZdZUded<ded<d$d	�Zd%d�Zed&d���Zed'd���Zed(d���Zed)d*d���Zed+d���Z		d,d-d�Zd.d�Zd/d!�Z	d0d#�Z
dS)1�SectionWrapperzFinal[IniConfig]�config�
Final[str]�namer�str�return�Nonec�"�||_||_dS�N)rr)�selfrrs   �c/builddir/build/BUILD/cloudlinux-venv-1.0.6/venv/lib/python3.11/site-packages/iniconfig/__init__.py�__init__zSectionWrapper.__init__'s�������	�	�	��
int | Nonec�B�|j�|j|��Sr"�r�lineofr�r#rs  r$r*zSectionWrapper.lineof+s���{�!�!�$�)�T�2�2�2r&�key�
str | Nonec��dSr"��r#r,s  r$�getzSectionWrapper.get.����r&�convert�Callable[[str], _T]�	_T | Nonec��dSr"r/)r#r,r3s   r$r1zSectionWrapper.get2�	��	�r&�defaultc��dSr"r/�r#r,r8r3s    r$r1zSectionWrapper.get:�	��	�r&Nr�str | _Dc��dSr"r/r:s    r$r1zSectionWrapper.getCr2r&�_T | _Dc��dSr"r/r:s    r$r1zSectionWrapper.getGr;r&�	_D | None�Callable[[str], _T] | None�_D | _T | str | Nonec�H�|j�|j|||���S)N)r3r8)rr1rr:s    r$r1zSectionWrapper.getQs"���{���t�y�#�w���P�P�Pr&c�<�|jj|j|Sr")r�sectionsrr0s  r$�__getitem__zSectionWrapper.__getitem__Ys���{�#�D�I�.�s�3�3r&�
Iterator[str]c#��K��jj��ji��}d�fd�}t	||���Ed{V��dS)Nr,rr�intc�D���j��j|��Sr"r))r,r#s �r$r*z'SectionWrapper.__iter__.<locals>.lineof_s����;�%�%�d�i��5�5�5r&�r,)r,rrrI)rrEr1r�sorted)r#�sectionr*s`  r$�__iter__zSectionWrapper.__iter__\sn�����%)�[�%9�%=�%=�d�i��%L�%L��	6�	6�	6�	6�	6�	6��'�v�.�.�.�.�.�.�.�.�.�.�.�.r&�Iterator[tuple[str, str]]c#�,K�|D]}|||fV��dSr"r/r+s  r$�itemszSectionWrapper.itemsds7�����	#�	#�D���T�
�"�"�"�"�"�	#�	#r&)rrrrrr )rrrr')r,rrr-)r,rr3r4rr5)r,rr8r r3r4rr5r")r,rr8rr3r rr<)r,rr8rr3r4rr>�NN)r,rr8r@r3rArrB)r,rrr)rrG)rrO)�__name__�
__module__�__qualname__�__annotations__r%r*rr1rFrNrQr/r&r$rr#s]�������������������3�3�3�3������X�������X�������X��������X�������X��"�.2�	Q�Q�Q�Q�Q�4�4�4�4�/�/�/�/�#�#�#�#�#�#r&rc���eZdZUded<ded<		d*d+d�Zd,d-d�Zed.d���Zed/d���Zed0d���Ze	d,d1d���Zed2d���Z		d3d4d"�Zd5d$�Zd6d&�Z	d7d)�Z
dS)8rr�pathz&Final[Mapping[str, Mapping[str, str]]]rEN�utf-8�str | os.PathLike[str]�datar-�encodingrrr c�X�tj|��|_|�Bt|j|���5}|���}ddd��n#1swxYwYtj|j|�d����}i|_ix|_	}|D]�\}}}	}
|�t|j|d���||j||	f<|	�(||j	vrt|j|d|�����i||<�U|	|j	|vrt|j|d|	�����|
�J�|
|||	<��dS)N)r\Tzno section header definedzduplicate section zduplicate name )�os�fspathrX�open�readr�parse_lines�
splitlines�_sourcesrEr)r#rXr[r\�fp�tokens�
sections_data�linenorMr�values           r$r%zIniConfig.__init__ms����I�d�O�O��	��<��d�i�(�3�3�3�
!�r��w�w�y�y��
!�
!�
!�
!�
!�
!�
!�
!�
!�
!�
!����
!�
!�
!�
!��#�D�I�t���t�/D�/D�E�E����
�(*�*��
�
�,2�	5�	5�(�F�G�T�5��� ���F�4O�P�P�P�+1�D�M�'�4�-�(��|��d�m�+�+�$��	�6�+K��+K�+K����*,�
�g�&�&��4�=��1�1�1�$�T�Y��8R�$�8R�8R�S�S�S��(�(�(�/4�
�g�&�t�,�,�	5�	5s�A�A�ArMrr'c�L�|j�||f��}|�dn|dzS)Nr)rdr1)r#rMrrhs    r$r*zIniConfig.lineof�s-����"�"�G�T�?�3�3���~�t�t�6�A�:�5r&c��dSr"r/)r#rMrs   r$r1z
IniConfig.get�r7r&r3r4r5c��dSr"r/)r#rMrr3s    r$r1z
IniConfig.get�r;r&r8c��dSr"r/�r#rMrr8r3s     r$r1z
IniConfig.get��	��	�r&rr<c��dSr"r/rns     r$r1z
IniConfig.get�s	��	�r&r>c��dSr"r/rns     r$r1z
IniConfig.get�ror&r@rArBc�l�	|j||}|�||��S|S#t$r|cYSwxYwr")rE�KeyError)r#rMrr8r3ris      r$r1z
IniConfig.get�sY��	���w�/��5�E��"��w�u�~�~�%����
�	�	�	��N�N�N�	���s�$�3�3rc�R�||jvrt|���t||��Sr")rErsrr+s  r$rFzIniConfig.__getitem__�s+���t�}�$�$��4�.�.� ��d�D�)�)�)r&�Iterator[SectionWrapper]c#�jK�t|j|j���D]}t||��V��dS)NrK)rLrEr*rr+s  r$rNzIniConfig.__iter__�sI�����4�=�d�k�:�:�:�	-�	-�D� ��t�,�,�,�,�,�,�	-�	-r&�arg�boolc��||jvSr")rE)r#rws  r$�__contains__zIniConfig.__contains__�s���d�m�#�#r&)NrY)rXrZr[r-r\rrr r")rMrrr-rr')rMrrrrr-)rMrrrr3r4rr5)
rMrrrr8r r3r4rr5)
rMrrrr8rr3r rr<)
rMrrrr8rr3r4rr>rR)
rMrrrr8r@r3rArrB)rrrr)rru)rwrrrx)rSrTrUrVr%r*rr1rFrNrzr/r&r$rrisn�����������4�4�4�4�
 ��	5�5�5�5�5�B6�6�6�6�6������X�������X�������X���DH������X��
�����X��"�.2������"*�*�*�*�
-�-�-�-�$�$�$�$�$�$r&r)�__doc__�
__future__r�typingrrrrrr	r
rrr
rrr^�typing_extensionsr�__all__�
exceptionsr�rrrrrrrr/r&r$�<module>r�s�����#�"�"�"�"�"�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�	�	�	��(�'�'�'�'�'�'�
F�
F�
F��"�"�"�"�"�"�������/�/�/�/�/�/�/�/��W�T�]�]���W�T�]�]��C#�C#�C#�C#�C#�C#�C#�C#�Lo$�o$�o$�o$�o$�o$�o$�o$�o$�o$r&