HOME


Mini Shell 1.0
Redirecting to https://devs.lapieza.net/iniciar-sesion Redirecting to https://devs.lapieza.net/iniciar-sesion.
DIR: /proc/self/root/usr/lib/python3/dist-packages/debian/__pycache__/
Upload File :
Current File : //proc/self/root/usr/lib/python3/dist-packages/debian/__pycache__/watch.cpython-311.pyc
�

)uyc=%���dZddlZddlZ	ddlmZmZmZmZmZm	Z	m
Z
n#e$rYnwxYwdZddddd	�Z
ejd
��ZGd�de��ZGd
�de��Zd�Zd�ZGd�de��ZGd�de��ZdS)z'Functions for working with watch files.�N)�Iterable�Iterator�List�Optional�Sequence�TextIO�Tuple�z[-_]?(\d[\-+\.:\~\da-zA-Z]*)z2(?i)\.(?:tar\.xz|tar\.bz2|tar\.gz|zip|tgz|tbz|txz)zL(?i)\.(?:tar\.xz|tar\.bz2|tar\.gz|zip|tgz|tbz|txz)\.(?:asc|pgp|gpg|sig|sign)z%[\+~](debian|dfsg|ds|deb)(\.)?(\d+)?$)z
@ANY_VERSION@z
@ARCHIVE_EXT@z@SIGNATURE_EXT@z	@DEB_EXT@zdebian.watchc��eZdZdZdS)�MissingVersionzThe version= line is missing.N��__name__�
__module__�__qualname__�__doc__���./usr/lib/python3/dist-packages/debian/watch.pyrr=s������'�'�'�'rrc��eZdZdZdS)�WatchFileFormatErrorz(Raised when the input is not valid.
    Nr
rrrrrAs���������rrc��tt�����}||d<|���D]\}}|�||��}�|S)z�Apply substitutions to a string.

    :param text: text to apply substitutions to
    :param package: package name, as a string
    :return: text with subsitutions applied
    z	@PACKAGE@)�dict�
SUBSTITUTIONS�items�replace)�text�package�substs�k�vs     r�expandr!Fs^���-�%�%�'�'�
(�
(�F�"�F�;�������"�"���1��|�|�A�q�!�!����Krc�\�|rt|���t�|��dS�N)r�logger�warning)�msg�stricts  r�	_complainr(Ws0��
�(�"�3�'�'�'�
�N�N�3�����rc�D�eZdZdZddefd�Zd�Zd�Zedd���Z	dS)	�	WatchFilez�A Debian watch file.

    :ivar entries: list of Watch entries
    :ivar options: optional list of global options, applied to all Watch
        entries
    :ivar version: watch file version
    Nc�@�||_|�g}||_|�g}||_dSr#)�version�entries�options)�selfr-r.r,s    r�__init__zWatchFile.__init__gs1��
����?��G�����?��G�����rc�*�t|j��Sr#)�iterr-�r/s r�__iter__zWatchFile.__iter__ts���D�L�!�!�!rc�R�d�}|j�|�d|jz��|jr&|�||j��dz��|jD]�}|jr&|�||j��dz��|�|j��|jr|�d|jz��|jr|�d|jz��|jr|�d|jz��|�d����dS)aOWrite the contents of a watch file to a file-like object.

        Note that this will not preserve the formatting of the original file,
        and thus it is currently not possible to use this function to
        parse and reserialize a file and end up with the same contents.

        :param f: File-like object to write to
        c�V�d�|��}d|vsd|vrd|zdzSd|zS)N�,� �	zopts="�"�opts=)�join)�opts�ss  r�serialize_optionsz)WatchFile.dump.<locals>.serialize_options�s;��������A��a�x�x�4�1�9�9��!�|�c�)�)��Q�;�rNzversion=%d
�
r8)r,�writer.r-�url�matching_pattern�script)r/�fr?�entrys    r�dumpzWatchFile.dumpxs>��	�	�	��<�#�
�G�G�N�T�\�1�2�2�2��<�	<�
�G�G�%�%�d�l�3�3�d�:�;�;�;��\�
	�
	�E��}�
@����)�)�%�-�8�8�3�>�?�?�?�
�G�G�E�I�����%�
6�����e�4�4�5�5�5��}�
-�����e�m�+�,�,�,��|�
,�����e�l�*�+�+�+�
�G�G�D�M�M�M�M�
	�
	rFc�.�g}g}|D]�}|�d��r�|���s�-|�d���d��r)|�|�d�����~|�|��|�|��g}��|r%td|��|�|��|sdSd�|�d����}	|�d	d
��\}}n#t$rt���wxYw|���dkrt���t|�����}	g}
g}|D�]�}|	dkrd
�|D��}d�|�����}|s�?|�d��r�|ddkrF|�dd��}
|
dkrtd|z���|d|
�}||
d
zd�}n?	|dd��dd
��\}}n#t$r|dd�}d}YnwxYw|�d��}ng}|r�	|�dd
��\}}n#t$r|}d}YnwxYwtjd|��}|r\t|d��ft!|�dd
����z}|dt#|d��d
z
�}n#t!|�dd����}|�t%|g|�Rd|i������|
�|����|||
|	���S)a@Parse from the contents that make up a watch file.

        :param lines: watch file lines to parse
        :return: instance or None if there are no non-comment lines in the file
        :raise MissingVersion: if there is no version number declared
        :raise ValueError: when syntax errors are encountered
        �#r@�\z
\z*watchfile ended with \; skipping last lineN�r�=�r,�c�6�g|]}|�����Sr)�lstrip)�.0�chunks  r�
<listcomp>z(WatchFile.from_lines.<locals>.<listcomp>�s ��?�?�?�e�5�<�<�>�>�?�?�?rr;�r:����zNot matching " in %rr7z/([^/]*\([^/]*\)[^/]*)$�r=)r-r.r,)�
startswith�strip�rstrip�endswith�appendr(r<�pop�split�
ValueErrorr�int�index�re�findall�str�tuple�len�Watch�extend)�cls�linesr'�joined_lines�	continued�line�	firstline�key�valuer,�persistent_optionsr-�chunked�optend�opts_strr=rB�m�partss                   r�
from_lineszWatchFile.from_lines�s�����	��
	�
	�D����s�#�#�
���:�:�<�<�
���{�{�4� � �)�)�$�/�/�
�� � ����V�!4�!4�5�5�5�5�� � ��&�&�&��#�#�I�.�.�.��	�	��	+��C�V�L�L�L����	�*�*�*��	��4��G�G�L�,�,�Q�/�/�0�0�	�	#�"����a�0�0�J�C�����	#�	#�	#� �"�"�"�	#�����9�9�;�;�)�#�#� �"�"�"��e�k�k�m�m�$�$������#�&	0�&	0�G���{�{�@�?�w�?�?�?���7�7�7�#�#�)�)�+�+�D��
�����w�'�'�
���7�c�>�>�!�Z�Z��Q�/�/�F���|�|�(�)?�$�)F�G�G�G�#�A�f�H�~�H���q��	�	�?�D�D�"�+/����8�>�>�$��+B�+B�(��4�4��%�"�"�"�#'����8��!����"���� �~�~�c�*�*������
0�� $�
�
�4�� 3� 3�I�C����!�����C��D�D�D������J�9�3�?�?���7� ��1��Y�Y�M�E�$�*�*�T�1�2E�2E�,F�,F�F�E��m��A�a�D�	�	�z�!�|�m�,�C�C�!�$�*�*�T�1�"5�"5�6�6�E����u�S�<�5�<�<�<�t�<�<�=�=�=�=�"�)�)�$�/�/�/�/��s��%7��J�J�J�	Js0�D � D9�0!I�I+�*I+�	J#�#J4�3J4)F)
rrrr�DEFAULT_VERSIONr0r4rG�classmethodrwrrrr*r*^s�����������(�����"�"�"����@�NJ�NJ�NJ��[�NJ�NJ�NJrr*c�.�eZdZdZ				dd�Zd�Zd�ZdS)rgaOWatch line entry.

    This will contain the attributes documented in uscan(1):

    :ivar url: The URL (possibly including the filename regex)
    :ivar matching_pattern: a filename regex, optional
    :ivar version: version policy, optional
    :ivar script: script to run, optional
    :ivar opts: a list of options, as strings
    Nc�T�||_||_||_||_|�g}||_dSr#)rBrCr,rDr.)r/rBrCr,rDr=s      rr0zWatch.__init__�s6����� 0����������<��D�����rc�p�|jj�d|j�d|j�d|j�d|j�d|j�d�S)N�(z, matching_pattern=z
, version=z	, script=z, opts=�))�	__class__rrBrCr,rDr.r3s r�__repr__zWatch.__repr__sH����'�'�'�����4�3H�3H�3H�����d�k�k�k�4�<�<�<�
9�	:rc���t|t��sdS|j|jko?|j|jko/|j|jko|j|jko|j|jkS)NF)�
isinstancergrBrCr,rDr.)r/�others  r�__eq__zWatch.__eq__st���%��'�'�	��5��	�T�X�%�.��&�$�*?�?�.��
���-�.�����+�.��
���-�		/r)NNNN)rrrrr0r�r�rrrrgrg�s^������	�	�#'����
�
�
�
�:�:�:�/�/�/�/�/rrg)r�loggingrb�typingrrrrrrr	�ImportErrorrxr�	getLoggerr$�	Exceptionrr_rr!r(�objectr*rgrrr�<module>r�s���$.�-�����	�	�	�	�
	�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
���	�	�	��D�	����
��
5�K�	&�:�
�
�
� 
��	�>�	*�	*��(�(�(�(�(�Y�(�(�(������:����
���"���IJ�IJ�IJ�IJ�IJ��IJ�IJ�IJ�X*/�*/�*/�*/�*/�F�*/�*/�*/�*/�*/s��'�'