a )g@sfddlmZmZmZeZddlmZmZddl m Z ddl m Z m Z dZe iaddZd d d ZdS) )absolute_importdivisionprint_function)MappingSet) is_sequence)CLIArgs GlobalCLIArgs)CLIARGScCst|adS)z%Initialize the global context objectsN)r Z from_optionsr )Zcli_argsr 3/usr/lib/python3.9/site-packages/ansible/context.py_init_global_context!sr NFcsfdd}|S)aAClosure 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 csDtjd}s|St|r*|ddSt|ttfr@|S|S)N)default)r getr isinstancerrcopy)valuerkey shallowcopyr r inner0s z#cliargs_deferred_get..innerr )rrrrr rr cliargs_deferred_get's  r)NF)Z __future__rrrtypeZ __metaclass__collections.abcrrZ'ansible.module_utils.common.collectionsrZansible.utils.context_objectsrr __all__r r rr r r r s