mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-06-28 11:10:21 -07:00
Rename function bool() as it is a Python built-in function (#15651)
This commit is contained in:
parent
f2980fc565
commit
7af47a3886
1 changed files with 2 additions and 2 deletions
|
@ -106,7 +106,7 @@ def to_nice_json(a, *args, **kw):
|
||||||
# Fallback to the to_json filter
|
# Fallback to the to_json filter
|
||||||
return to_json(a, *args, **kw)
|
return to_json(a, *args, **kw)
|
||||||
|
|
||||||
def bool(a):
|
def to_bool(a):
|
||||||
''' return a bool for the arg '''
|
''' return a bool for the arg '''
|
||||||
if a is None or type(a) == bool:
|
if a is None or type(a) == bool:
|
||||||
return a
|
return a
|
||||||
|
@ -431,7 +431,7 @@ class FilterModule(object):
|
||||||
'win_splitdrive': partial(unicode_wrap, ntpath.splitdrive),
|
'win_splitdrive': partial(unicode_wrap, ntpath.splitdrive),
|
||||||
|
|
||||||
# value as boolean
|
# value as boolean
|
||||||
'bool': bool,
|
'bool': to_bool,
|
||||||
|
|
||||||
# quote string for shell usage
|
# quote string for shell usage
|
||||||
'quote': quote,
|
'quote': quote,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue