mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Fix indentation
This commit is contained in:
parent
32ffa87732
commit
9f94414095
1 changed files with 26 additions and 26 deletions
|
@ -24,33 +24,33 @@ from copy import deepcopy
|
||||||
class Attribute:
|
class Attribute:
|
||||||
|
|
||||||
def __init__(self, isa=None, private=False, default=None, required=False, listof=None, priority=0, class_type=None, always_post_validate=False, inherit=True):
|
def __init__(self, isa=None, private=False, default=None, required=False, listof=None, priority=0, class_type=None, always_post_validate=False, inherit=True):
|
||||||
"""
|
"""
|
||||||
:class:`Attribute` specifies constraints for attributes of objects which
|
:class:`Attribute` specifies constraints for attributes of objects which
|
||||||
derive from playbook data. The attributes of the object are basically
|
derive from playbook data. The attributes of the object are basically
|
||||||
a schema for the yaml playbook.
|
a schema for the yaml playbook.
|
||||||
|
|
||||||
:kwarg isa: The type of the attribute. Allowable values are a string
|
:kwarg isa: The type of the attribute. Allowable values are a string
|
||||||
representation of any yaml basic datatype, python class, or percent.
|
representation of any yaml basic datatype, python class, or percent.
|
||||||
(Enforced at post-validation time).
|
(Enforced at post-validation time).
|
||||||
:kwarg private: (not used)
|
:kwarg private: (not used)
|
||||||
:kwarg default: Default value if unspecified in the YAML document.
|
:kwarg default: Default value if unspecified in the YAML document.
|
||||||
:kwarg required: Whether or not the YAML document must contain this field.
|
:kwarg required: Whether or not the YAML document must contain this field.
|
||||||
If the attribute is None when post-validated, an error will be raised.
|
If the attribute is None when post-validated, an error will be raised.
|
||||||
:kwarg listof: If isa is set to "list", this can optionally be set to
|
:kwarg listof: If isa is set to "list", this can optionally be set to
|
||||||
ensure that all elements in the list are of the given type. Valid
|
ensure that all elements in the list are of the given type. Valid
|
||||||
values here are the same as those for isa.
|
values here are the same as those for isa.
|
||||||
:kwarg priority: The order in which the fields should be parsed. Generally
|
:kwarg priority: The order in which the fields should be parsed. Generally
|
||||||
this does not need to be set, it is for rare situations where another
|
this does not need to be set, it is for rare situations where another
|
||||||
field depends on the fact that another field was parsed first.
|
field depends on the fact that another field was parsed first.
|
||||||
:kwarg class_type: If isa is set to “class”, this can be optionally set to
|
:kwarg class_type: If isa is set to “class”, this can be optionally set to
|
||||||
a class (not a string name). The YAML data for this field will be
|
a class (not a string name). The YAML data for this field will be
|
||||||
passed to the __init__ method of that class during post validation and
|
passed to the __init__ method of that class during post validation and
|
||||||
the field will be an instance of that class.
|
the field will be an instance of that class.
|
||||||
:kwarg always_post_validate: Controls whether a field should be post
|
:kwarg always_post_validate: Controls whether a field should be post
|
||||||
validated or not (default: True).
|
validated or not (default: True).
|
||||||
:kwarg inherit: A boolean value, which controls whether the object
|
:kwarg inherit: A boolean value, which controls whether the object
|
||||||
containing this field should attempt to inherit the value from its
|
containing this field should attempt to inherit the value from its
|
||||||
parent object if the local value is None.
|
parent object if the local value is None.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
self.isa = isa
|
self.isa = isa
|
||||||
|
|
Loading…
Reference in a new issue