Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes14kdownloads
dependency_groups.cpython-313.pyc90 linesDownload Raw Back to __pycache__
1�

2�j�'���SSKJr SSKrSSKJrJr SSKJr SSKJ	r	 /SQr3SSjr"S	S4\5r
"SS\5r"S
S\5r"SS5r"SS5rSSjr\R&"S5rSSjrSSjrg)�)�annotationsN)�Mapping�Sequence�)�_ErrorCollector)�Requirement)�CyclicDependencyGroup�DependencyGroupInclude�DependencyGroupResolver�DuplicateGroupNames�InvalidDependencyGroupObject�resolve_dependency_groupsc��[$�N)�__all__���MD:\code\apps\devtools\python\Lib\site-packages\packaging/dependency_groups.py�__dir__rs���Nrc��\rSrSrSrSrg)r�zU5The same dependency groups were defined twice, with different non-normalized names.6rN��__name__�7__module__�__qualname__�__firstlineno__�__doc__�__static_attributes__rrrrrs��rrc�0^�\rSrSrSrSU4SjjrSrU=r$)r	�"z-8The dependency group includes form a cycle.9c�>�XlX lX0lX2:XaUS3nO
USUSUSU3n[TU]SUSU35 g)Nz includes itselfz -> �, z0Cyclic dependency group include while resolving z: )�requested_group�group�
include_group�super�__init__)�selfr#r$r%�reason�	__class__s     �rr'�CyclicDependencyGroup.__init__'sd���.���10�*���!��w�.�/�F�%��d�5�'��E�7�$�}�o�N�F�
���>���r�&��
+�	11r)r$r%r#)r#�strr$r,r%r,�return�None)rrrrrr'r�
__classcell__)r*s@rr	r	"s����12�13rr	c��\rSrSrSrSrg)r
�9zY14A member of a dependency group was identified as a dict, but was not in a valid15format.16rNrrrrr
r
9s��rr
c�,�\rSrSrSrSSjrSSjrSrg)r17�E�r%c��Xlg)zp18Initialize a DependencyGroupInclude.19 20:param include_group: The name of the group referred to by this include.21Nr4)r(r%s  rr'�DependencyGroupInclude.__init__Hs22��+�rc�P�URRSUR<S3$)N�(�))r*rr%)r(s r�__repr__�DependencyGroupInclude.__repr__Ps'���.�.�)�)�*�!�D�,>�,>�+A��C�CrN)r%r,r-r.)r-r,)rrrr�	__slots__r'r:rrrrr23r24Es��"�I�+�Drr25c�n�\rSrSrSrS26SjrSSjrSSjrS
SjrSSjr	Sr27g	)r�Ta@28A resolver for Dependency Group data.29 30This class handles caching, name normalization, cycle detection, and other31parsing requirements. There are only two public methods for exploring the data:32``lookup()`` and ``resolve()``.33 34:param dependency_groups: A mapping, as provided via pyproject35    ``[dependency-groups]``.36c��[5n[X5Ul0Ul0Ul0UlUR
S5 g)Nz$[dependency-groups] data was invalid)r�_normalize_group_names�dependency_groups�_parsed_groups�_include_graph_ancestors�_resolve_cache�finalize)r(rA�errorss   rr'� DependencyGroupResolver.__init__`sH��!�"��!7�8I�!R���37
�	
��EG��%�BD������>�?rc��[U5n[5RSU<S35nURX5sSSS5 $!,(df   g=f)z�38Lookup a group name, returning the parsed dependency data for that group.39This will not resolve includes.40 41:param group: the name of the group to lookup42�[dependency-groups] data for � was malformedN)�_normalize_namer�on_exit�_parse_group�r(r$rFs   r�lookup�DependencyGroupResolver.lookupssL�� ��&��
�
�
&�
&�+�E�9�N�C�43�
��$�$�U�3�44�45�46�s�A�47Ac��[U5n[5RSU<S35nURXU5sSSS5 $!,(df   g=f)zg48Resolve a dependency group to a list of requirements.49 50:param group: the name of the group to resolve51rIrJN)rKrrL�_resolverNs   r�resolve�DependencyGroupResolver.resolve�sL�� ��&��
�
�
&�
&�+�E�9�N�C�52�
��=�=��v�6�53�54�55�s�A�56Ac���XR;aURU$URX5n/nUH�n[U[5(aUR	U5 M+[U[575(a�[
UR5nXpRRUS5;a'UR[X!UR55 M�/URRUS5QUP7URU'URURXrU55 M�[SU35e UR(ag[!U5URU'URU$)a\58This is a helper for cached resolution to strings. It preserves the name of the59group which the user initially requested in order to present a clearer error in60the event that a cycle is detected.61 62:param group: The normalized name of the group to resolve.63:param requested_group: The group which was used in the original, user-facing64    request.65rz+Invalid dependency group item after parse: )rDrM�66isinstancer�appendr67rKr%rC�get�errorr	�extendrR�NotImplementedErrorrF�tuple)r(r$r#rF�parsed�resolved_group�itemr%s        rrR� DependencyGroupResolver._resolve�sU���'�'�'��&�&�u�-�-��"�"�5�1�����D��$��,�,��%�%�d�+��D�"8�9�9� /��0B�0B� C�
�!�$A�$A�$E�$E�e�R�$P�P��L�L�-�+�D�4F�4F���D��6�6�:�:�5�"�E�D��D�D�1�1�-�@�#�)�)��
�
�m�f�M��*�A�$��H���5�B�=�=��%*�>�%:����E�"��"�"�5�)�)rc�p�XR;aURU$XR;aUR[SUS355 gURUn[	U[685(a UR[
SU<S355 g[	U[5(d UR[
SU<S355 g/nUH�n[	U[695(aUR[U55 M4[	U[5(a\[UR55S:wa UR[SU<355 M�US	nUR[US7095 M�UR[
SU<355 M� [U5URU'URU$)NzDependency group 'z' not foundrzDependency group z' contained a string rather than a list.z is not a sequence type.)�
include-groupzInvalid dependency group item: rbr4)rBrArY�LookupErrorrVr,�	TypeErrorrrWrrr\�keysr
r71)r(r$rF�	raw_group�elementsr_r%s       rrM�$DependencyGroupResolver._parse_group�s����'�'�'��&�&�u�-�-��.�.�.��L�L��'9�%���%L�M�N���*�*�5�1�	��i��%�%��L�L��'��y�0W�X��
�72��)�X�.�.��L�L��-�e�Y�6N�O�P�
��?A���D��$��$�$�����D� 1�2��D�'�*�*������%�);�;��L�L�4�=�d�X�F���%)��$9�M��O�O�$:��$W�X����Y�)H���'Q�R�S�#�&&+�8�_����E�"��"�"�5�)�)r)rCrBrDrAN)rA�/Mapping[str, Sequence[str | Mapping[str, str]]]r-r.)r$r,r-�0tuple[Requirement | DependencyGroupInclude, ...])r$r,r-�tuple[Requirement, ...])r$r,r#r,rFrr-rk)r$r,rFrr-rj)rrrrrr'rOrSrRrMrrrrrrTsn��	�@�J�@�73�@�&4�7�8*��8*�+.�8*�8G�8*�	 �8*�t/*��/*�"1�/*�	9�/*rrc�D^�[U5m[U4SjU55$)z�74Resolve a dependency group to a tuple of requirements, as strings.75 76:param dependency_groups: the parsed contents of the ``[dependency-groups]`` table77    from ``pyproject.toml``78:param groups: the name of the group(s) to resolve79c3�l># �UH)nTRU5Hn[U5v� M M+ g7fr)rSr,)�.0r$�r�resolvers   �r�	<genexpr>�,resolve_dependency_groups.<locals>.<genexpr>80s+����M�V�E�X�5E�5E�e�5L���Q���5L��V�s�14)rr\)rA�groupsrps  @rrr�s!���'�'8�9�H��M�V�M�M�Mrz[-_.]+c�J�[RSU5R5$)N�-)�_NORMALIZE_PATTERN�sub�lower)�names rrKrKs���!�!�#�t�,�2�2�4�4rc�T�0n0nUR5H5upE[U5nURU/5RU5 XSU'M7 UR5HFupx[	U5S:�dMUR[
SUSSRU5S355 MH U$)Nrz"Duplicate dependency group names: z (r"r9)�itemsrK�81setdefaultrW�lenrYr�join)	rArF�original_names�normalized_groups�82group_name�value�normed_group_name�normed_name�namess	         rr@r@s���,.�N�FH��.�4�4�6��83�+�J�7���!�!�"3�R�8�?�?�84�K�/4�+�,�7�85-�2�2�4����u�:��>��L�L�#�8�"�m�2�d�i�i��&6�%7�q�:��
�5��r)r-z	list[str])rArirsr,r-ztuple[str, ...])ryr,r-r,)rArirFrr-z,dict[str, Sequence[str | Mapping[str, str]]])�86__future__r�re�collections.abcrrrFr�requirementsrrr�87ValueErrorrr	r
r88rr�compilervrKr@rrr�<module>r�s���"�	�-�#�%�����*��89�J�90�.�:��D�D�c*�c*�VN�F�N�TW�N��N�&�Z�Z�	�*��5��F����2�r
codekingpro/portable-devtools · Team Ai