§
    øyIf*  ã                  óž   — d Z ddlmZ ddlmZmZ ddlmZmZm	Z	m
Z
 ddlmZ erddlmZ ddlmZmZ ddlmZmZ  G d	„ d
e¦  «        Zdd
gZdS )zSources.é    )Úannotations)ÚABCÚabstractmethod)ÚTYPE_CHECKINGÚAnyÚIteratorÚList)ÚSection)ÚPath)ÚLoaderÚOverrideMap)Ú	ConfigSetÚCoreConfigSetc                  óÎ   — e Zd ZdZdZd$d„Zd%d„Zed&d„¦   «         Zed'd„¦   «         Z	ed(d„¦   «         Z
ed)d„¦   «         Zed*d„¦   «         Zed+d!„¦   «         Zed,d"„¦   «         Zd#S )-ÚSourcez_Source is able to return a configuration value (for either the core or per environment source).Ú Úpathr   ÚreturnÚNonec                ó"   — || _         i | _        d S ©N)r   Ú_section_to_loaders)Úselfr   s     úI/var/www/piapp/venv/lib/python3.11/site-packages/tox/config/source/api.pyÚ__init__zSource.__init__   s   € ØˆŒ	ØACˆÔ Ð Ð ó    Úsectionr
   Úbaseúlist[str] | NoneÚoverride_mapr   Úconfr   úIterator[Loader[Any]]c              #  ó  K  — |                       |¦  «        }|j        }|| j        v r| j        |         E d{V —† dS g }|| j        |<   |                      ||¦  «        }|�|                     |¦  «         |V — |�‰|                     dt          t                   d|¬¦  «         |                      |d         |¦  «        D ]E}|}	|                      ||¦  «        }|€|	}Œ|	�	|�||	_	        |V — |                     |¦  «         ŒDdS dS )a9  
        Return a loader that loads settings from a given section name.

        :param section: the section to load
        :param base: base sections to fallback to
        :param override_map: a list of overrides to apply
        :param conf: the config set to use
        :returns: the loaders to use
        Nr   z(inherit missing keys from these sections)ÚkeysÚof_typeÚdescÚdefault)
Útransform_sectionÚkeyr   Ú
get_loaderÚappendÚ
add_configr	   ÚstrÚget_base_sectionsÚparent)
r   r   r   r    r!   r)   ÚloadersÚloaderÚbase_sectionÚchilds
             r   Úget_loaderszSource.get_loaders   sX  è è € ð  ×(Ò(¨Ñ1Ô1ˆØŒkˆØ�$Ô*Ð*Ð*ØÔ/°Ô4Ð4Ð4Ð4Ð4Ð4Ð4Ð4ØˆFØ%'ˆØ(/ˆÔ  Ñ%Ø%)§_¢_°W¸lÑ%KÔ%KˆØÐØ�NŠN˜6Ñ"Ô"Ð"ØˆLˆLˆLàÐØ�OŠOØÝ�Sœ	Ø?Øð	 ñ ô ð ð !%× 6Ò 6°t¸F´|ÀWÑ MÔ Mð 	'ð 	'�Ø�ØŸš¨°|ÑDÔD�Ø�>Ø"�FØØÐ$¨Ð);Ø#)�E”LØ���Ø—’˜vÑ&Ô&Ð&Ð&ð! Ðð	'ð 	'r   c                ó   — t           ‚r   ©ÚNotImplementedError)r   r   s     r   r(   zSource.transform_sectionH   ó   € å!Ð!r   úLoader[Any] | Nonec                ó   — t           ‚r   r6   )r   r   r    s      r   r*   zSource.get_loaderL   r8   r   ú	list[str]Ú
in_sectionúIterator[Section]c                ó   — t           ‚r   r6   )r   r   r<   s      r   r.   zSource.get_base_sectionsP   r8   r   c                ó   — t           ‚)z
        Return a loader that loads the core configuration values.

        :returns: the core loader from this source
        r6   ©r   s    r   ÚsectionszSource.sectionsT   s
   € õ "Ð!r   Ú	core_confr   úIterator[str]c                ó   — t           ‚)z‚
        :param core_conf: the core configuration set
        :returns: a list of environments defined within this source
        r6   )r   rB   s     r   ÚenvszSource.envs]   s
   € õ "Ð!r   Úitemr-   ú$tuple[Section, list[str], list[str]]c                ó   — t           ‚)z+:returns: the section for a tox environmentr6   )r   rF   s     r   Úget_tox_env_sectionzSource.get_tox_env_sectione   ó
   € õ "Ð!r   c                ó   — t           ‚)z:returns: the core sectionr6   r@   s    r   Úget_core_sectionzSource.get_core_sectionj   rJ   r   N)r   r   r   r   )
r   r
   r   r   r    r   r!   r   r   r"   )r   r
   r   r
   )r   r
   r    r   r   r9   )r   r;   r<   r
   r   r=   )r   r=   )rB   r   r   rC   )rF   r-   r   rG   )r   r
   )Ú__name__Ú
__module__Ú__qualname__Ú__doc__ÚFILENAMEr   r4   r   r(   r*   r.   rA   rE   rI   rL   © r   r   r   r      s,  € € € € € ØiÐià€HðDð Dð Dð Dð,'ð ,'ð ,'ð ,'ð\ ð"ð "ð "ñ „^ð"ð ð"ð "ð "ñ „^ð"ð ð"ð "ð "ñ „^ð"ð ð"ð "ð "ñ „^ð"ð ð"ð "ð "ñ „^ð"ð ð"ð "ð "ñ „^ð"ð ð"ð "ð "ñ „^ð"ð "ð "r   r   r
   N)rP   Ú
__future__r   Úabcr   r   Útypingr   r   r   r	   Útox.config.loader.sectionr
   Úpathlibr   Útox.config.loader.apir   r   Útox.config.setsr   r   r   Ú__all__rR   r   r   ú<module>r[      sú   ðØ €à "Ð "Ð "Ð "Ð "Ð "à #Ð #Ð #Ð #Ð #Ð #Ð #Ð #Ø 5Ð 5Ð 5Ð 5Ð 5Ð 5Ð 5Ð 5Ð 5Ð 5Ð 5Ð 5à -Ð -Ð -Ð -Ð -Ð -àð 9ØÐÐÐÐÐà9Ð9Ð9Ð9Ð9Ð9Ð9Ð9Ø8Ð8Ð8Ð8Ð8Ð8Ð8Ð8ð\"ð \"ð \"ð \"ð \"ˆSñ \"ô \"ð \"ð@ Øð€€€r   