mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-10-04 23:44:00 -07:00
Selectively assign the getter for better performance
Introduces the `inherit` param for FieldAttributes, which is now used in BaseMeta when constructing the getter property to enhance performance by reducing the amount of work the getter generally has to do.
This commit is contained in:
parent
3a51587220
commit
96e2be9bf8
3 changed files with 60 additions and 21 deletions
|
@ -30,9 +30,9 @@ from ansible.playbook.taggable import Taggable
|
|||
|
||||
class Block(Base, Become, Conditional, Taggable):
|
||||
|
||||
_block = FieldAttribute(isa='list', default=[])
|
||||
_rescue = FieldAttribute(isa='list', default=[])
|
||||
_always = FieldAttribute(isa='list', default=[])
|
||||
_block = FieldAttribute(isa='list', default=[], inherit=False)
|
||||
_rescue = FieldAttribute(isa='list', default=[], inherit=False)
|
||||
_always = FieldAttribute(isa='list', default=[], inherit=False)
|
||||
_delegate_to = FieldAttribute(isa='list')
|
||||
_delegate_facts = FieldAttribute(isa='bool', default=False)
|
||||
_any_errors_fatal = FieldAttribute(isa='bool')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue