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

simplify cmd_runner_fmt.as_bool_not() (#8512)

* simplify cmd_runner_fmt.as_bool_not()

* add changelog frag
This commit is contained in:
Alexei Znamensky 2024-06-16 19:46:03 +12:00 committed by GitHub
parent 03966624ba
commit ec4cf55566
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 3 additions and 1 deletions

View file

@ -0,0 +1,2 @@
minor_changes:
- cmd_runner_fmt module utils - simplify implementation of ``cmd_runner_fmt.as_bool_not()`` (https://github.com/ansible-collections/community.general/pull/8512).

View file

@ -127,7 +127,7 @@ class _Format(object):
@staticmethod @staticmethod
def as_bool_not(args): def as_bool_not(args):
return _ArgFormat(lambda value: [] if value else _ensure_list(args), ignore_none=False) return _Format.as_bool([], args, ignore_none=False)
@staticmethod @staticmethod
def as_optval(arg, ignore_none=None): def as_optval(arg, ignore_none=None):