Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes15kdownloads
_static.cpython-313.pyc103 linesDownload Raw Back to __pycache__
1�

2��j�����SSKJr SSKJr SSKrSSKJr "SS5rS\	S	\3S4\5SS4Sjr"S
S\6\5r"SS\
\5r"SS\\5rSH
r\"\\S5 M "SS\\5rSH
r\"\\S5 M "SS\R(R*\5r\"S5rS\S\4Sjr\7\\
\\\\\0rS\S\4SjrS\S\4Sjr\"5r\"5rg) �)�wraps)�TypeVarN�)�SetuptoolsDeprecationWarningc�(�\rSrSr%SrSr\\S'Srg)�Static�	a88Wrapper for built-in object types that are allow setuptools to identify9static core metadata (in opposition to ``Dynamic``, as defined :pep:`643`).10 11The trick is to mark values with :class:`Static` when they come from12``pyproject.toml`` or ``setup.cfg``, so if any plugin overwrite the value13with a built-in, setuptools will be able to recognise the change.14 15We inherit from built-in classes, so that we don't need to change the existing16code base to deal with the new types.17We also should strive for immutability objects to avoid changes after the18initial parsing.19F�	_mutated_�N)	�__name__�20__module__�__qualname__�__firstlineno__�__doc__r21�bool�__annotations__�__static_attributes__r��XD:\code\apps\devtools\python\user_packages\Python313\site-packages\setuptools/_static.pyrr	s����I�t�rr�target�method�copying�returnc�^^�[XS5mTcg[T5S[4UU4Sjj5nSUl[	XU5 g)z�22Because setuptools is very flexible we cannot fully prevent23plugins and user customizations from modifying static values that were24parsed from config files.25But we can attempt to block "in-place" mutations and identify when they26were done.27N�selfc�^>�SUl[R"SSTS3SS9 T"U/UQ70UD6$)NTz/Direct modification of value will be disallowedz�28            In an effort to implement PEP 643, direct/in-place changes of static values29            that come from configuration files are deprecated.30            If you need to modify this value, please first create a copy with z�31            and make sure conform to all relevant standards when overriding setuptools32            functionality (https://packaging.python.org/en/latest/specifications/).33            )i��34r)�due_date)r35r�emit)r�args�kwargsr�fns   ��r�_replacement�+_prevent_modification.<locals>._replacement'sS������$�)�)�=�O�PW�i�X
�
�$�36	37��$�(��(��(�(r�)�getattrrrr�setattr)rrrr#r"s  ` @r�_prevent_modificationr(sJ���38���	&�B�	�z��39�2�Y�)�6�)��)�"�L���F�L�)rc��\rSrSrSrg)�Str�=rN�rr
rrrrrrr*r*=���rr*c��\rSrSrSrg)�Tuple�ArNr,rrrr/r/Ar-rr/c��\rSrSrSrSrg)�List�Ea[40:meta private:41>>> x = List([1, 2, 3])42>>> is_static(x)43True44>>> x += [0]  # doctest: +IGNORE_EXCEPTION_DETAIL45Traceback (most recent call last):46SetuptoolsDeprecationWarning: Direct modification ...47>>> is_static(x)  # no longer static after modification48False49>>> y = list(x)50>>> y.clear()51>>> y52[]53>>> y == x54False55>>> is_static(List(y))56True57rN�rr
rrrrrrrr2r2Es��rr2)58�__delitem__�__iadd__�__setitem__�append�clear�extend�insert�remove�reverse�popz
`list(value)`c��\rSrSrSrSrg)�Dict�la{59:meta private:60>>> x = Dict({'a': 1, 'b': 2})61>>> is_static(x)62True63>>> x['c'] = 0  # doctest: +IGNORE_EXCEPTION_DETAIL64Traceback (most recent call last):65SetuptoolsDeprecationWarning: Direct modification ...66>>> x._mutated_67True68>>> is_static(x)  # no longer static after modification69False70>>> y = dict(x)71>>> y.popitem()72('b', 2)73>>> y == x74False75>>> is_static(Dict(y))76True77rNr4rrrr@r@ls��rr@)r5�__ior__r7r9r>�popitem�78setdefault�updatez
`dict(value)`c��\rSrSrSrSrg)�SpecifierSet�z>Not exactly a built-in type but useful for ``requires-python``rNr4rrrrGrG�s��HrrG�T�valuec��U$)z79>>> noop(42)804281r�rJs r�nooprM�s	��82�Lrc�T�[R[U5[5"U5$)zO83>>> is_static(attempt_conversion("hello"))84True85>>> is_static(object())86False87)�_CONVERSIONS�get�typerMrLs r�attempt_conversionrR�s �����D��K��.�u�5�5rc�R�[U[5=(a UR(+$)z�88>>> is_static(a := Dict({'a': 1}))89True90>>> is_static(dict(a))91False92>>> is_static(b := List([1, 2, 3]))93True94>>> is_static(list(b))95False96)�97isinstancerr98rLs r�	is_staticrU�s���e�V�$�<�U�_�_�)<�<r)�	functoolsr�typingr�packaging.specifiers�	packaging�warningsrrrQ�strr(r*�tupler/�listr2�_method�dictr@�99specifiersrGrIrMrOrR�objectrrU�100EMPTY_LIST�101EMPTY_DICTrrr�<module>rds1�����2���$*�$�*��*�c�*�d�*�D	�#�v�	�	�E�6�	��4���0�G��$���9���4���0	�G��$���9�	�I�9�'�'�4�4�f�I��C�L�����a���S�%���d�D�$�?��6�a�6�A�6�=�V�=��=��V�102�
�V�103r
codekingpro/portable-devtools · Team Ai