%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /lib/python3/dist-packages/debian/__pycache__/
Upload File :
Create Path :
Current File : //lib/python3/dist-packages/debian/__pycache__/copyright.cpython-312.pyc

�

Cf�c�z���dZddlZddlZddlZddlZddlZ	ddlmZmZm	Z	m
Z
mZmZm
Z
mZmZmZmZmZmZmZedZedZddlmZmZmZmZmZddlmZm Z 	dd	lm!Z!d
Z"e#e"g�Z$ejJe&�Z'Gd�de(�Z)Gd
�de)�Z*Gd�de)e+�Z,d�Z-Gd�de.�Z/d�Z0Gd�de.�Z1Gd�de.�Z2d�Z3d�Z4d�Z5d�Z6Gd�dejndd��Z8d �Z9Gd!�d"e:�Z;Gd#�d$e;�%�Z<Gd&�d'e<�Z=Gd(�d)e<�Z>Gd*�d+e<�Z?y#e$rdZY��wxYw#e$rY��wxYw),a9Utilities for parsing and creating machine-readable debian/copyright files.

The specification for the format (also known as DEP5) is available here:
https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/

Start from the Copyright docstring for usage information.

Copyright Classes
-----------------
�N)�Any�Callable�	FrozenSet�IO�Iterable�Iterator�List�Optional�Pattern�Text�Tuple�Union�
TYPE_CHECKING�cast)�FilesParagraph�LicenseParagraph)�HeaderrrF)�parse_deb822_file�Deb822ParagraphElement�Deb822FileElement�'Deb822NoDuplicateFieldsParagraphElement�SyntaxOrParseError)�RestrictedField�RestrictedFieldError)�Deb822ValueTypezBhttps://www.debian.org/doc/packaging-manuals/copyright-format/1.0/c��eZdZdZy)�Errorz)Base class for exceptions in this module.N��__name__�
__module__�__qualname__�__doc__���2/usr/lib/python3/dist-packages/debian/copyright.pyrrSs��3r$rc��eZdZdZy)�NotMachineReadableErrorzFRaised when the input is not a machine-readable debian/copyright file.Nrr#r$r%r'r'Ws��Pr$r'c��eZdZdZy)�MachineReadableFormatErrorz�Raised when the input is not valid.

    This is both a `copyright.Error` and a `ValueError` to ease handling of
    errors coming from this module.
    Nrr#r$r%r)r)[s��r$r)c�H�|rt|��tj|�y�N)r)�logger�warning)�msg�stricts  r%�	_complainr0cs��
�(��-�-�
�N�N�3�r$c���eZdZdZd
�fd�	Zed��Zejd��Zd�Zd�Z	d�Z
d�Zd	�Zd
�Z
d�Zdd�Z�xZS)�	Copyrighta�Represents a debian/copyright file.

    A Copyright object contains a Header paragraph and a list of additional
    Files or License paragraphs.  It provides methods to iterate over those
    paragraphs, in addition to adding new ones.  It also provides a mechanism
    for finding the Files paragraph (if any) that matches a particular
    filename.

    Typical usage::

        with io.open('debian/copyright', 'rt', encoding='utf-8') as f:
            c = copyright.Copyright(f)

            header = c.header
            # Header exposes standard fields, e.g.
            print('Upstream name: ', header.upstream_name)
            lic = header.license
            if lic:
                print('Overall license: ', lic.synopsis)
            # You can also retrieve and set custom fields.
            header['My-Special-Field'] = 'Very special'

            # Find the license for a given file.
            paragraph = c.find_files_paragraph('debian/rules')
            if paragraph:
                print('License for debian/rules: ', paragraph.license)

            # Dump the result, including changes, to another file.
            with io.open('debian/copyright.new', 'wt', encoding='utf-8') as f:
                c.dump(f=f)

    It is possible to build up a Copyright from scratch, by modifying the
    header and using add_files_paragraph and add_license_paragraph.  See the
    associated method docstrings.
    c����tt|��g|_|��d}	t	|||��|_|j
D]v}|�t|�}�d|vr*t|||��}|jj|��?d|vr(t||�}|jj|��ktd|��x|std��||_ytj �|_t�|_|j
j|jj"�|jj|j�y#t$r}tt|���d}~wwxYw)a� Create a new copyright file in the current format.

        :param sequence: Sequence of lines, e.g. a list of strings or a
            file-like object.  If not specified, a blank Copyright object is
            initialized.
        :param encoding: Encoding to use, in case input is raw byte strings.
            It is recommended to use unicode objects everywhere instead, e.g.
            by opening files in text mode.
        :param strict: Raise if format errors are detected in the data.

        Raises:
            :class:`NotMachineReadableError` if 'sequence' does not contain a
                machine-readable debian/copyright file.
            MachineReadableFormatError if 'sequence' is not a valid file.
        N)�sequence�encoding�#accept_files_with_duplicated_fields�Files)r/�Licensez=Non-header paragraph has neither "Files" nor "License" fieldszno paragraphs in input)�superr2�__init__�_Copyright__paragraphsr�_Copyright__filerr'�strrr�appendrr0�_Copyright__headerr�new_empty_file�_underlying_paragraph)
�selfr4r5r/�header�e�p�pf�pl�	__class__s
         �r%r:zCopyright.__init__�sL���"	�i��'�)�������F�
6�/�!)�H�@F�J�H���
�[�[�
:���>�#�A�Y�F���\�'��6�&�A�B��%�%�,�,�R�0��!�^�)�!�V�4�B��%�%�,�,�R�0��1�28�:�
:��-�.F�G�G�"�D�M�,�:�:�<�D�K�"�H�D�M��K�K���t�}�}�B�B�C����$�$�T�]�]�3��-&�
6�-�c�!�f�5�5��
6�s�E�	E-�E(�(E-c��|jS)zThe file header paragraph.)r?�rBs r%rCzCopyright.header�s���}�}�r$c�H�t|t�std��||_y)Nzvalue must be a Header object)�
isinstancer�	TypeErrorr?)rB�hdrs  r%rCzCopyright.header�s!���#�v�&��;�<�<���
r$c�f�tj|jgd�|jD��S)aReturns an iterator over all paragraphs (header, Files, License).

        The header (returned first) will be returned as a Header object; file
        paragraphs as FilesParagraph objects; license paragraphs as
        LicenseParagraph objects.

        c3� K�|]}|���y�wr+r#��.0rEs  r%�	<genexpr>z+Copyright.all_paragraphs.<locals>.<genexpr>�s����.L�Q�q�.L�s�)�	itertools�chainrCr;rJs r%�all_paragraphszCopyright.all_paragraphs�s'��������}�.L�$�:K�:K�.L�M�Mr$c�"�|j�S)zXIterate over all paragraphs

        see all_paragraphs() for more information

        )rVrJs r%�__iter__zCopyright.__iter__�s���"�"�$�$r$c�(�d�|jD�S)z>Returns an iterator over the contained FilesParagraph objects.c3�BK�|]}t|t�s�|���y�wr+)rLrrQs  r%rSz1Copyright.all_files_paragraphs.<locals>.<genexpr>�s����N�a�
�1�n�0M��N�����r;rJs r%�all_files_paragraphszCopyright.all_files_paragraphs�s��O�4�,�,�N�Nr$c�\�d}|j�D]}|j|�s�|}�|S)z�Returns the FilesParagraph for the given filename.

        In accordance with the spec, this method returns the last FilesParagraph
        that matches the filename.  If no paragraphs matched, returns None.
        N)r]�matches)rB�filename�resultrEs    r%�find_files_paragraphzCopyright.find_files_paragraph�s9�����*�*�,�	�A��y�y��"���	��
r$c�.�t|t�std��d}t|j�D]\}}t|t�s�|}�|jj|dz|�|jj|dz|j�y)z�Adds a FilesParagraph to this object.

        The paragraph is inserted directly after the last FilesParagraph (which
        might be before a standalone LicenseParagraph).
        z+paragraph must be a FilesParagraph instance�����N)rLrrM�	enumerater;�insertr<rA)rB�	paragraph�last_i�irEs     r%�add_files_paragraphzCopyright.add_files_paragraph�s����)�^�4��I�J�J����d�/�/�0�	�D�A�q��!�^�,���	�	
��� � ��!��Y�7������6�A�:�y�'F�'F�Gr$c�(�d�|jD�S)z=Returns an iterator over standalone LicenseParagraph objects.c3�BK�|]}t|t�s�|���y�wr+)rLrrQs  r%rSz3Copyright.all_license_paragraphs.<locals>.<genexpr>	s����P�a�
�1�>N�0O��P�r[r\rJs r%�all_license_paragraphsz Copyright.all_license_paragraphss��Q�4�,�,�P�Pr$c��t|t�std��|jj	|�|j
j	|j�y)zoAdds a LicenceParagraph to this object.

        The paragraph is inserted after any other paragraphs.
        z-paragraph must be a LicenseParagraph instanceN)rLrrMr;r>r<rA)rBris  r%�add_license_paragraphzCopyright.add_license_paragraphsG���)�%5�6��K�L�L���� � ��+������9�:�:�;r$c�b�|jj�}|�|j|�y|S)aaDumps the contents of the copyright file.

        If f is None, returns a unicode object.  Otherwise, writes the contents
        to f, which must be a file-like object that is opened in text mode
        (i.e. that accepts unicode objects directly).  It is thus up to the
        caller to arrange for the file to do any appropriate encoding.
        N)r<�dump�write)rB�f�ss   r%rszCopyright.dumps.��
�K�K������=�
�G�G�A�J���r$)Nzutf-8Tr+)rr r!r"r:�propertyrC�setterrVrXr]rbrlrorqrs�
__classcell__�rHs@r%r2r2jsg���"�H14�f����
�]�]����	N�%�O�
�H�"Q�
	<�r$r2c�$�d|vrtd��|S)zNReturns s if it is a single line; otherwise raises MachineReadableFormatError.�
zmust be single line)r)�rvs r%�_single_liner~'s���q�y�(�)>�?�?��Hr$c�0�eZdZdZed��Zed��Zy)�
_LineBasedz@Namespace for conversion methods for line-based lists as tuples.c�t�td�d�|xsdj�j�D�D��S)z?Returns the lines in 's', with whitespace stripped, as a tuple.c3�$K�|]}|r|���
y�wr+r#�rR�vs  r%rSz&_LineBased.from_str.<locals>.<genexpr>7s�����1����s�c3�<K�|]}|j����y�wr+)�strip)rR�lines  r%rSz&_LineBased.from_str.<locals>.<genexpr>8s����N�t�d�j�j�l�N�s��)�tupler��
splitlinesr}s r%�from_strz_LineBased.from_str3s7����N���R���/@�/K�/K�/M�N���	r$c��t|�}|syd�}t|�dk(r||d�Sdg}|D]}|jd||�z��dj|�S)z�Returns the sequence as a string with each element on its own line.

        If 'seq' has one element, the result will be on a single line.
        Otherwise, the first line will be blank.
        Nc�^�|j�}|std��d|vrtd��|S)N�values must not be emptyr|z values must not contain newlines)r�r)r}s r%�process_and_validatez/_LineBased.to_str.<locals>.process_and_validateGs8�����	�A��0�1K�L�L��q�y�0�6�8�8��Hr$rerr�� r|)�list�lenr>�join)�seq�lr��tmprvs     r%�to_strz_LineBased.to_str;so��
��I����	��q�6�Q�;�'��!��-�-��d���	6�A��J�J�s�1�!�4�4�5�	6��y�y��~�r$N)rr r!r"�staticmethodr�r�r#r$r%r�r�/s-��J��������r$r�c�T�eZdZdZej
d�Zed��Ze	d��Z
y)�_SpaceSeparatedzENamespace for conversion methods for space-separated lists as tuples.z\sc�J�td�|xsdj�D��S)z>Returns the values in s as a tuple (empty if only whitespace).c3�&K�|]	}|s�|���y�wr+r#r�s  r%rSz+_SpaceSeparated.from_str.<locals>.<genexpr>ds����7�1�Q�Q�7�s��r�)r��splitr}s r%r�z_SpaceSeparated.from_str`s ���7���b��� 1�7�7�7r$c��t|�}|syg}|D]V}|jj|�rtd��|j	�}|std��|j|��Xdj
|�S)zAReturns the sequence as a space-separated string (None if empty).Nz"values must not contain whitespacer�r�)r��
_has_space�searchr)r�r>r�)�clsr�r�r�rvs     r%r�z_SpaceSeparated.to_strfs~��
��I�������	�A��~�~�$�$�Q�'�0�8�:�:����	�A��0�1K�L�L��J�J�q�M�	��x�x��}�r$N)rr r!r"�re�compiler�r�r��classmethodr�r#r$r%r�r�Zs=��O�����E�"�J��8��8�
���r$r�c�:�|�yt|j��S)z�Formats multiline text for insertion in a Deb822ParagraphElement field.

    Each line except for the first one is prefixed with a single space.  Lines
    that are blank or only whitespace are replaced with ' .'
    N)�format_multiline_linesr�r}s r%�format_multiliner�{s��	�y��!�!�,�,�.�1�1r$c��g}t|�D]2\}}|dk7r|j�sd}d|z}|j|��4dj|�S)z?Same as format_multline, but taking input pre-split into lines.r�.r�r|)rgr�r>r�)�lines�	out_linesrkr�s    r%r�r��s^���I��U�#����4���6��:�:�<�����:�D��������9�9�Y��r$c�<�|�ydjt|��S)agInverse of format_multiline.

    Technically it can't be a perfect inverse, since format_multline must
    replace all-whitespace lines with ' .'.  Specifically, this function:

      - Does nothing to the first line
      - Removes first character (which must be ' ') from each proceeding line.
      - Replaces any line that is '.' with an empty line.
    Nr|)r��parse_multiline_as_linesr}s r%�parse_multiliner��s!��	�y���9�9�-�a�0�1�1r$c��|j�}t|�D]9\}}|dk(r�|jd�r|dd}ntd��|dk(rd}|||<�;|S)zpSame as parse_multiline, but returns a list of lines.

    (This is the inverse of format_multiline_lines.)
    rr�reNz"continued line must begin with " "r�r�)r�rg�
startswithr))rvr�rkr�s    r%r�r��st��
�L�L�N�E��U�#�
���4���6���?�?�3�����8�D�,�4�6�
6��3�;��D���a��
��Lr$c�:��eZdZdZd�fd�	Zed��Zd�Z�xZS)r8z7Represents the contents of a License field.  Immutable.c�J��tt|�|t|�|xsd��S)a�Creates a new License object.

        :param synopsis: The short name of the license, or an expression giving
            alternatives.  (The first line of a License field.)
        :param text: The full text of the license, if any (may be None).  The
            lines should not be mangled for "deb822"-style wrapping - i.e. they
            should not have whitespace prefixes or single '.' for empty lines.
        r�)�synopsis�text)r9r8�__new__r~)r�r�r�rHs   �r%r�zLicense.__new__�s0����W�c�*��,�x�0��
��+�E�	Er$c
��|�yt|�}|s|d�S||ddjtj|dd����S)Nr�rr|re)r�)r�r�rT�islice)r�rvr�s   r%r�zLicense.from_str�sK��
�9��(��+����r�7�N��5��8�$�)�)�I�,<�,<�U�A�t�,L�"M�N�Nr$c�d�t|jg|jj�z�Sr+)r�r�r�r�rJs r%r�zLicense.to_str�s%��%�t�}�}�o��	�	�8L�8L�8N�&N�O�Or$)r�)	rr r!r"r�r�r�r�ryrzs@r%r8r8�s(���A�E��O��O�Pr$r8z
synopsis textc��tj�}t|�D]�\}}|dk7r|jd�d}t	|�}||ks�/||}|dz
}|dk(r|jd�n�|dk(r|jd�n{|dk(rR||kr||}|dz
}ntd	��|d
vr%|jt
j|��n2td|z��|jt
j|��||kr����|jd�t
j|j�tjtjz�S)
a^Returns an re object for the given globs.

    Only * and ? wildcards are supported.  Literal * and ? may be matched via
    \* and \?, respectively.  A literal backslash is matched \\.  Any other
    character after a backslash is forbidden.

    Empty globs match nothing.

    Raises MachineReadableFormatError if any of the globs is illegal.
    r�|re�*z.*�?r��\z#single backslash not allowed at endz\?*zinvalid escape sequence: \%sz\Z)�io�StringIOrgrtr�r)r��escaper��getvalue�	MULTILINE�DOTALL)�globs�bufrk�glob�n�cs      r%�globs_to_rer��s5��
�+�+�-�C��U�#�(���4���6��I�I�c�N�
����I���!�e��Q��A�
��F�A��C�x��	�	�$���c���	�	�#���d���q�5��Q��A���F�A�4�=�?�?���;��I�I�b�i�i��l�+�4�7�!�;�=�=��	�	�"�)�)�A�,�'�)�!�e�(�:�I�I�e��
�:�:�c�l�l�n�b�l�l�R�Y�Y�&>�?�?r$c�"��eZdZdZ�fd�Z�xZS)�_ClassInitMetaa�Metaclass for classes that can be initialized at creation time.

    Implement the method::

      @classmethod
      def _class_init(cls, new_attrs):
          pass

    on a class, and apply this metaclass to it.  The _class_init method will be
    called right after the class is created.  The 'new_attrs' param is a dict
    containing the attributes added in the definition of the class.
    c�R��tt|�|||�|j|�yr+)r9r�r:�_class_init)r��name�bases�attrsrHs    �r%r:z_ClassInitMeta.__init__s$���	�n�c�+�D�%��?�����r$)rr r!r"r:ryrzs@r%r�r�
s�����r$r�c���eZdZdZe�Zed��Zed��Zd�fd�	Z	e
d��Zd�Zd�Z
d�Zd	�Zd
�Z			d
d�Z�xZS)�_RestrictedWrappera^Base class to wrap a Deb822 object, restricting write access to some keys.

    The underlying data is hidden internally.  Subclasses may keep a reference
    to the data before giving it to this class's constructor, if necessary, but
    RestrictedField should cover most use-cases.  The dump method from
    Deb822 is directly proxied.

    Typical usage::

        class Foo(object):
            def __init__(self, ...):
                # ...

            @staticmethod
            def from_str(self, s):
                # Parse s...
                return Foo(...)

            def to_str(self):
                # Return in string format.
                return ...

        class MyClass(deb822._RestrictedWrapper):
            def __init__(self):
                data = Deb822ParagraphElement.new_empty_paragraph()
                data['Bar'] = 'baz'
                super(MyClass, self).__init__(data)

            foo = deb822.RestrictedField(
                    'Foo', from_str=Foo.from_str, to_str=Foo.to_str)

            bar = deb822.RestrictedField('Bar', allow_none=False)

        d = MyClass()
        d['Bar'] # returns 'baz'
        d['Bar'] = 'quux' # raises RestrictedFieldError
        d.bar = 'quux'
        d.bar # returns 'quux'
        d['Bar'] # returns 'quux'

        d.foo = Foo(...)
        d['Foo'] # returns string representation of foo
    c���g}|j�D]Q\}}t|t�s�|j|jj��|j
||��St|�|_yr+)	�itemsrLrr>r��lower�)_RestrictedWrapper__init_restricted_field�	frozenset�%_RestrictedWrapper__restricted_fields)r��	new_attrs�restricted_fields�	attr_name�vals     r%r�z_RestrictedWrapper._class_initQse����'�o�o�/�	<�N�I�s��#��/�!�(�(������)9�:��+�+�I�s�;�	<�#,�,=�">��r$c
�`���fd�}�fd�}t||t||d�j��y)Nc���|jj�j�}�j��j|�S|Sr+)�_RestrictedWrapper__data�getr�r��rBr��fields  �r%�getterz:_RestrictedWrapper.__init_restricted_field.<locals>.getter\s7����+�+�/�/�%�*�*�-�C��~�~�)��~�~�c�*�*��Jr$c�
��|��j��j|�}|�H�jr0�j|jvr#|j�j=yt	d��y||j�j<y)Nzvalue must not be None)r��
allow_noner�r�rMr�s  �r%rxz:_RestrictedWrapper.__init_restricted_field.<locals>.settercsr�����5�<�<�#;��l�l�3�'���{��#�#��z�z�T�[�[�0� �K�K��
�
�3�#�$<�=�=�1�
+.����E�J�J�'r$)�setattrrwr�)r�r�r�r�rxs  `  r%�__init_restricted_fieldz*_RestrictedWrapper.__init_restricted_fieldZs*���	�	.�	��Y�����u�z�z� J�Kr$c���tt|��|r;t|t�s+tdt
|jj�z��||_	y)zEInitializes the wrapper over 'data', a Deb822ParagraphElement object.z!Paragraph has duplicated fields: N)
r9r�r:rLr�
ValueErrorr=rHr!r��rB�data�_internal_validaterHs   �r%r:z_RestrictedWrapper.__init__rsG���	� �$�0�2��j��7^�&_��@�3�t�~�~�Gb�Gb�Cc�c�d�d���r$c��|jSr+�r�rJs r%rAz(_RestrictedWrapper._underlying_paragraphzs���{�{�r$c� �|j|Sr+r��rB�keys  r%�__getitem__z_RestrictedWrapper.__getitem__s���{�{�3��r$c�v�|j�|jvrtd|z��||j|<y�Nz<%s may not be modified directly; use the associated property�r�r�rr�)rBr��values   r%�__setitem__z_RestrictedWrapper.__setitem__�s@���9�9�;�$�2�2�2�&��!�"�#�
#�!����C�r$c�r�|j�|jvrtd|z��|j|=yr�r�r�s  r%�__delitem__z_RestrictedWrapper.__delitem__�s>���9�9�;�$�2�2�2�&��!�"�#�
#�
�K�K��r$c�(�d�|jD�S)Nc3�2K�|]}t|����y�wr+)r=)rR�ks  r%rSz._RestrictedWrapper.__iter__.<locals>.<genexpr>�s����,�1��A��,�s�r�rJs r%rXz_RestrictedWrapper.__iter__�s��,����,�,r$c�,�t|j�Sr+)r�r�rJs r%�__len__z_RestrictedWrapper.__len__�s���4�;�;��r$c�X�|��|�(|s&|jjtd|��y|jj�}|�+td|�j|j	|��y|rtd|�j|�y|jj�S)zcCalls dump() on the underlying data object.

        See Deb822.dump for more information.
        Nz	IO[bytes]zIO[str])r�rsrrt�encode)rB�fdr5�	text_mode�as_strs     r%rsz_RestrictedWrapper.dump�s����>���	���� � ��k�2�!6�7���[�[�%�%�'�F��#��[�"�%�+�+�F�M�M�(�,C�D����Y��#�)�)�&�1���{�{���!�!r$�T)NNF)rr r!r"r�r�r�r�r�r:rwrAr�r�r�rXr�rsryrzs@r%r�r�"s}���*�X$�+���?��?��L��L�.����� �!��-� �
���"r$r�)�	metaclassc���eZdZdZej
d�Zd�fd�	Zed��Z	d�Z
d�Zede
je
jd�	�Zed
d��Zedejejd�	�Zed
�Z�xZS)rz�Represents a Files paragraph of a debian/copyright file.

    This kind of paragraph is used to specify the copyright and license for a
    particular set of files in the package.
    r�c����tt|�||�|rGd|vrtd��d|vrt	d|�d|vrt	d|�|j
st	d|�d|jf|_y)	Nr7z"Files" field requiredr2z'Files paragraph missing Copyright fieldr8z%Files paragraph missing License fieldz%Files paragraph has empty Files fieldr�)r9rr:r)r0�files�_default_re�!_FilesParagraph__cached_files_pat)rBr�r�r/rHs    �r%r:zFilesParagraph.__init__�sw���
�n�d�,�T�3E�F���d�"�0�1I�J�J��$�&��C�V�L���$��A�6�J��:�:��A�6�J�#%�t�'7�'7�"8��r$c�h�|tj�d��}||_||_||_|S)z�Create a new FilesParagraph from its required parts.

        :param files: The list of file globs.
        :param copyright: The copyright for the files (free-form text).
        :param license: The Licence for the files.
        F�r�)r�new_empty_paragraphr�	copyright�license)r�rrrrEs     r%�createzFilesParagraph.create�s5��
�&�:�:�<�QV�W����������	��r$c��|d}|jd|k7r|t|j�f|_|jdS)z�Returns a regular expression equivalent to the Files globs.

        Caches the result until files is set to a different value.

        Raises ValueError if any of the globs are invalid.
        rrre)r
r�r)rB�	files_strs  r%�
files_patternzFilesParagraph.files_pattern�sG����M�	��"�"�1�%��2�'0�+�d�j�j�2I�&J�D�#��&�&�q�)�)r$c�N�|j�}|�y|j|�duS)z8Returns True iff filename is matched by a glob in Files.NF)r�match)rBr`�pats   r%r_zFilesParagraph.matches�s.��� � �"���;���y�y��"�$�.�.r$r7F�r�r�r�r2)r�r8�Comment)TT)rr r!r"r�r�r	r:r�rrr_rr�r�r�rrr8r�commentryrzs@r%rr�s������"�*�*�R�.�K�9�"����(*�/�
��/�2�2��%�%�%�
9�E� ���>�I���G�,�,�W�^�^���G��i�(�Gr$rc���eZdZdZd	�fd�	Zed��Zedejejd��Zed�Zed�Z
�xZS)
ra Represents a standalone license paragraph of a debian/copyright file.

    Minimally, this kind of paragraph requires a 'License' field and has no
    'Files' field.  It is used to give a short name to a license text, which
    can be referred to from the header or files paragraphs.
    c�p��tt|�||�|rd|vrtd��d|vrtd��yy)Nr8z"License" field requiredr7z%input appears to be a Files paragraph)r9rr:r)r�s   �r%r:zLicenseParagraph.__init__sN���
���.�t�5G�H����$�0�1K�L�L��$��0�;�=�=��r$c��t|t�std��|tj�d��}||_|S)z2Returns a LicenseParagraph with the given license.z"license must be a License instanceFr)rLr8rMrr
r)r�rris   r%rzLicenseParagraph.creates?��
�'�7�+��@�A�A��.�B�B�D�Y^�_�	�#�	���r$r8Frrr7r)rr r!r"r:r�rrr8r�r�rr�_LicenseParagraph__filesryrzs@r%rrsY����=�������G�,�,�W�^�^���G��i�(�G��g�&�Gr$rc���eZdZdZd�fd�	Zd�Zd�Zeded��Z	ede�	�Z
ed
ejej��Zed�Zed
�Zed�Zedejej��Zed�Zedejej��Zedejej��Z�xZS)rz�Represents the header paragraph of a debian/copyright file.

    Property values are all immutable, such that in order to modify them you
    must explicitly set them (rather than modifying a returned reference).
    c����|�tj�}t|d<d|vr tj	d�|d|d<|d=t
t|�|�t�}|j}|tk7rU|�S|jd�s|dz
}|jd�rd|ddz}|tvrtj	d	�||_	|�td
��|tvrtj	d|�yy)z�Initializer.

        :param data: A Deb822ParagraphElement object for underlying data.  If None, a
            new one will be created.
        N�FormatzFormat-SpecificationzEuse of deprecated "Format-Specification" field; rewriting as "Format"�/zhttp:zhttps:%s�zFixing Format URLz0input is not a machine-readable debian/copyrightzformat not known: %r)rr
�_CURRENT_FORMATr,r-r9rr:r=�format�endswithr��_KNOWN_FORMATSr')rBr��fmtrHs   �r%r:zHeader.__init__5s�����<�)�=�=�?�D�,�D��N�!�T�)��N�N�4�
5�!�"8�9�D��N��+�,�
�f�d�$�T�*��e���k�k���/�!�c�o��<�<��$��s�
���~�~�g�&� �3�q�r�7�*���n�$����2�3�!����;�)�B�D�
D��n�$��N�N�1�3�7�%r$c�&�|jtvS)z%Returns True iff the format is known.)r$r&rJs r%�known_formatzHeader.known_format]s���{�{�n�,�,r$c�(�|jtk(S)z2Returns True iff the format is the current format.)r$r#rJs r%�current_formatzHeader.current_formatbs���{�{�o�-�-r$r F)r�r�z
Upstream-Name)r�zUpstream-Contact)r�r��Source�
Disclaimerrr8r2zFiles-ExcludedzFiles-Includedr+)rr r!r"r:r)r+rr~r$�
upstream_namer�r�r��upstream_contact�source�
disclaimerrr8rr�files_excluded�files_includedryrzs@r%rr.s�����&8�P-�
.����%�9�F�$���.�M�'��Z�%8�%8�� � �"���X�
&�F� ��.�J��i�(�G���G�,�,�W�^�^�E�G� ��,�I�$��:�#6�#6�� � �"�N�%��:�#6�#6�� � �"�Nr$r)@r"�collectionsrT�loggingr�r��typingrrrrrrr	r
rrr
rrr�ParagraphTypes�AllParagraphTypes�ImportError�debian._deb822_reprorrrrr�
debian.deb822rrrr#r�r&�	getLoggerrr,�	Exceptionrr'r�r)r0�objectr2r~r�r�r�r�r�r��
namedtupler8r��typer�r�rrrr#r$r%�<module>rAs���	�6���	�	������ �?�@�N��L�M��
��@�	�-�
I�������

��	�	�8�	$��4�I�4�Q�e�Q���
���z��z�z
�(��(�V�f��B	2�
 �
2� �*P�$�k�$�$�Y��@�P�F+@�\�T��0N"�>�N"�bN)�'�N)�b''�)�''�TU"�
�U"��q���M����	��	�s#�*D)�D6�)D3�2D3�6D>�=D>

Zerion Mini Shell 1.0