관리-도구
편집 파일: helpers.cpython-39.pyc
a �)g3 � @ sD d dl mZmZmZ eZd dlmZ ddd�Zddd�Z d d � Z dS ) � )�absolute_import�division�print_function)�string_types� c C sD t | t�r8| �d�r8t| �dd��}t|d | �p6|S t| �S dS )z| Converts a given value to a percentage if specified as "x%", otherwise converts the given value to an integer. �%� g Y@N)� isinstancer �endswith�int�replace)�valueZ num_itemsZ min_valueZ value_pct� r �9/usr/lib/python3.9/site-packages/ansible/utils/helpers.py� pct_to_int s r Nc s2 � du st � t�sg � t� �fdd�t��D ��S )zg Converts an object into a dict making the properties into keys, allows excluding certain keys Nc 3 s. | ]&}|� d �s|� v s|t�|�fV qdS )�_N)� startswith�getattr)�.0�key��exclude�objr r � <genexpr>+ � z!object_to_dict.<locals>.<genexpr>)r �list�dict�dir)r r r r r �object_to_dict% s r c s t � � � fdd�| D �S )zW Creates a deduplicated list with the order in which each item is first found. c s"