mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-23 13:20:23 -07:00
Move the arguments module into cli/ and context_objects into utils
* Note: Python2 is not as intelligent at detecting false import loops as Python3. context_objects.py cannot be added to cli/arguments because it would set up an import loop between cli/__init__.py, cli/arguments/context_objects.py, and context.py on Python2. ci_complete
This commit is contained in:
parent
ed8e60d804
commit
27c7d5bb01
19 changed files with 26 additions and 22 deletions
|
@ -15,14 +15,18 @@ 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
|
||||
"""
|
||||
|
||||
from ansible.arguments.context_objects import CLIArgs, GlobalCLIArgs
|
||||
from ansible.utils.context_objects import CLIArgs, GlobalCLIArgs
|
||||
|
||||
|
||||
__all__ = ('CLIARGS',)
|
||||
|
||||
# Note: this is not the singleton version. The Singleton is only created once the program has
|
||||
# actually parsed the args
|
||||
CLIARGS = CLIArgs({})
|
||||
|
||||
|
||||
# This should be called immediately after cli_args are processed (parsed, validated, and any
|
||||
# normalization performed on them). No other code should call it
|
||||
def _init_global_context(cli_args):
|
||||
"""Initialize the global context objects"""
|
||||
global CLIARGS
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue