1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

ansible/vars/: PEP8 compliancy (#24685)

- Make PEP8 compliant
This commit is contained in:
Dag Wieers 2017-05-16 19:51:27 +02:00 committed by John R Barker
parent 9178e176b5
commit 4f29662a9e
4 changed files with 24 additions and 25 deletions

View file

@ -81,6 +81,7 @@ def preprocess_vars(a):
return data
def strip_internal_keys(dirty):
'''
All keys stating with _ansible_ are internal, so create a copy of the 'dirty' dict
@ -628,7 +629,6 @@ class VariableManager:
return data
def add_group_vars_file(self, path, loader):
'''
Loads and caches a host_vars file in the _host_vars_files dict,

View file

@ -40,6 +40,7 @@ except ImportError:
__all__ = ['HostVars']
# Note -- this is a Mapping, not a MutableMapping
class HostVars(collections.Mapping):
''' A special view of vars_cache that adds values from the inventory when needed. '''

View file

@ -30,6 +30,7 @@ except ImportError:
from ansible.utils.display import Display
display = Display()
def get_reserved_names(include_private=True):
''' this function returns the list of reserved names associated with play objects'''
@ -66,6 +67,7 @@ def get_reserved_names(include_private=True):
return result
def warn_if_reserved(myvars):
''' this function warns if any variable passed conflicts with internally reserved names '''
reserved = get_reserved_names()
@ -74,4 +76,3 @@ def warn_if_reserved(myvars):
continue # we add this one internally
if varname in reserved:
display.warning('Found variable using reserved name: %s' % varname)

View file

@ -873,9 +873,6 @@ lib/ansible/utils/listify.py
lib/ansible/utils/path.py
lib/ansible/utils/ssh_functions.py
lib/ansible/utils/vars.py
lib/ansible/vars/__init__.py
lib/ansible/vars/hostvars.py
lib/ansible/vars/reserved.py
setup.py
test/integration/cleanup_azure.py
test/integration/cleanup_ec2.py