Collated PEP8 fixes (#25293)

- Make PEP8 compliant
This commit is contained in:
Dag Wieers 2017-06-02 13:14:11 +02:00 committed by John R Barker
parent 2f33c1a1a1
commit 5553b20828
206 changed files with 1853 additions and 1870 deletions

View file

@ -20,10 +20,11 @@ __metaclass__ = type
from ansible.errors import AnsibleError
from ansible.utils.vars import combine_vars
class Group:
''' a group of ansible hosts '''
#__slots__ = [ 'name', 'hosts', 'vars', 'child_groups', 'parent_groups', 'depth', '_hosts_cache' ]
# __slots__ = [ 'name', 'hosts', 'vars', 'child_groups', 'parent_groups', 'depth', '_hosts_cache' ]
def __init__(self, name=None):
@ -87,7 +88,7 @@ class Group:
self.child_groups.append(group)
# update the depth of the child
group.depth = max([self.depth+1, group.depth])
group.depth = max([self.depth + 1, group.depth])
# update the depth of the grandchildren
group._check_children_depth()
@ -105,7 +106,7 @@ class Group:
try:
for group in self.child_groups:
group.depth = max([self.depth+1, group.depth])
group.depth = max([self.depth + 1, group.depth])
group._check_children_depth()
except RuntimeError:
raise AnsibleError("The group named '%s' has a recursive dependency loop." % self.name)
@ -180,6 +181,5 @@ class Group:
try:
self.priority = int(priority)
except TypeError:
#FIXME: warn about invalid priority
# FIXME: warn about invalid priority
pass