File: //usr/lib/python3.9/site-packages/ansible/__pycache__/context.cpython-39.pyc
a
�)g� � @ sf d dl mZmZmZ eZd dlmZmZ d dl m
Z
d dlmZm
Z
dZei �add� Zdd
d�ZdS )
� )�absolute_import�division�print_function)�Mapping�Set)�is_sequence)�CLIArgs�
GlobalCLIArgs)�CLIARGSc C s t �| �adS )z%Initialize the global context objectsN)r Zfrom_optionsr
)Zcli_args� r �3/usr/lib/python3.9/site-packages/ansible/context.py�_init_global_context! s r
NFc s � ��fdd�}|S )aA Closure over getting a key from CLIARGS with shallow copy functionality
Primarily used in ``FieldAttribute`` where we need to defer setting the default
until after the CLI arguments have been parsed
This function is not directly bound to ``CliArgs`` so that it works with
``CLIARGS`` being replaced
c sD t j�� d�} �s| S t| �r*| d d � S t| ttf�r@| �� S | S )N)�default)r
�getr �
isinstancer r �copy)�value�r �key�shallowcopyr r �inner0 s z#cliargs_deferred_get.<locals>.innerr )r r r r r r r �cliargs_deferred_get'