Dashboard
PHP:
8.2.30
OS:
Linux
User:
dh_nv8b2m
/
/
usr
/
local
/
lib
/
python3.10
/
dist-packages
/
ansible
/
utils
/
__pycache__
📤 Upload
📝 New File
📁 New Folder
Close
Editing: helpers.cpython-310.pyc
o O�h� � @ s8 d dl mZ d dlmZ ddd�Zddd�Zd d � ZdS ) � )�annotations)�string_types� c C s@ t | t�r| �d�rt| �dd��}t|d | �p|S t| �S )z| Converts a given value to a percentage if specified as "x%", otherwise converts the given value to an integer. �%� g Y@)� isinstancer �endswith�int�replace)�value� num_items� min_value� value_pct� r �@/usr/local/lib/python3.10/dist-packages/ansible/utils/helpers.py� pct_to_int s r Nc s2 � du s t � 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 s0 � | ]}|� d �s|� v s|t�|�fV qdS )�_N)� startswith�getattr)�.0�key��exclude�objr r � <genexpr>) s �. 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"