File manager - Edit - /opt/saltstack/salt/lib/python3.10/site-packages/setuptools/_vendor/importlib_metadata/__pycache__/_adapters.cpython-310.pyc
Back
o ;j� � @ sX d dl Zd dlZd dlZd dlZddlmZ G dd� dejj�Z G dd� dej j�ZdS )� N� )� FoldedCasec @ s e Zd Zdd� ZdS )� RawPolicyc C s8 | j �tj|ddd� d��� �� �}|� d|� | j � �S )N� c S s dS )NT� )�liner r �c/opt/saltstack/salt/lib/python3.10/site-packages/setuptools/_vendor/importlib_metadata/_adapters.py�<lambda> s z RawPolicy.fold.<locals>.<lambda>)�prefix� predicatez: )�linesep�join�textwrap�indent�lstrip� splitlines)�self�name�value�foldedr r r �fold s ��zRawPolicy.foldN)�__name__� __module__�__qualname__r r r r r r s r c s~ e Zd ZdZeeeg d���Z dej j f� fdd�Zdd� Z� fdd �Z � fd d�Zdd � Z� fdd�Zedd� �Z� ZS )�Messagea� Specialized Message subclass to handle metadata naturally. Reads values that may have newlines in them and converts the payload to the Description. >>> msg_text = textwrap.dedent(''' ... Name: Foo ... Version: 3.0 ... License: blah ... de-blah ... <BLANKLINE> ... First line of description. ... Second line of description. ... <BLANKLINE> ... Fourth line! ... ''').lstrip().replace('<BLANKLINE>', '') >>> msg = Message(email.message_from_string(msg_text)) >>> msg['Description'] 'First line of description.\nSecond line of description.\n\nFourth line!\n' Message should render even if values contain newlines. >>> print(msg) Name: Foo Version: 3.0 License: blah de-blah Description: First line of description. Second line of description. <BLANKLINE> Fourth line! <BLANKLINE> <BLANKLINE> ) Z ClassifierzObsoletes-DistZPlatformzProject-URLz Provides-DistzProvides-Extraz Requires-DistzRequires-ExternalzSupported-PlatformZDynamic�origc s"