Tests as filters were deprecated, remove unused param (#57796)

pull/57559/head
Martin Krizek 5 years ago committed by Sam Doran
parent 1d6d19f400
commit 61ff61cdf6

@ -172,7 +172,7 @@ class Conditional:
) )
try: try:
e = templar.environment.overlay() e = templar.environment.overlay()
e.filters.update(templar._get_filters(e.filters)) e.filters.update(templar._get_filters())
e.tests.update(templar._get_tests()) e.tests.update(templar._get_tests())
res = e._parse(conditional, None, None) res = e._parse(conditional, None, None)

@ -442,7 +442,7 @@ class Templar:
self._no_type_regex = re.compile(r'.*?\|\s*(?:%s)(?:\([^\|]*\))?\s*\)?\s*(?:%s)' % self._no_type_regex = re.compile(r'.*?\|\s*(?:%s)(?:\([^\|]*\))?\s*\)?\s*(?:%s)' %
('|'.join(C.STRING_TYPE_FILTERS), self.environment.variable_end_string)) ('|'.join(C.STRING_TYPE_FILTERS), self.environment.variable_end_string))
def _get_filters(self, builtin_filters): def _get_filters(self):
''' '''
Returns filter plugins, after loading and caching them if need be Returns filter plugins, after loading and caching them if need be
''' '''
@ -775,7 +775,7 @@ class Templar:
setattr(myenv, key, ast.literal_eval(val.strip())) setattr(myenv, key, ast.literal_eval(val.strip()))
# Adds Ansible custom filters and tests # Adds Ansible custom filters and tests
myenv.filters.update(self._get_filters(myenv.filters)) myenv.filters.update(self._get_filters())
myenv.tests.update(self._get_tests()) myenv.tests.update(self._get_tests())
if escape_backslashes: if escape_backslashes:

Loading…
Cancel
Save