o nnh@s^dZddlmZddlmZmZddlmZddlm Z m Z dZ e ia ddZ d d d Zd S)a| Context of the running Ansible. In the future we *may* create Context objects to allow running multiple Ansible plays in parallel with different contexts but that is currently out of scope as the Ansible library is just for running the ansible command line tools. These APIs are still in flux so do not use them unless you are willing to update them with every Ansible release ) annotations)MappingSet) is_sequence)CLIArgs GlobalCLIArgs)CLIARGScCst|adS)z%Initialize the global context objectsN)r from_optionsr)cli_argsr :/usr/local/lib/python3.10/dist-packages/ansible/context.py_init_global_contextsr 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)rgetr isinstancerrcopy)valuerkey shallowcopyr r inner-s z#cliargs_deferred_get..innerr )rrrrr rr cliargs_deferred_get$s  r)NF)__doc__ __future__rcollections.abcrr'ansible.module_utils.common.collectionsransible.utils.context_objectsrr__all__rr rr r r r s