mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-07 22:02:50 +00:00
[PR #11189/1c678f5c backport][stable-12] fix ruff case UP030 (#11195)
fix ruff case UP030 (#11189)
* fix ruff case UP030
* add changelog frag
* formatting
* suggestion from review
(cherry picked from commit 1c678f5c07)
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
This commit is contained in:
@@ -145,7 +145,9 @@ class LookupModule(LookupBase):
|
||||
``variables`` are the variables to use.
|
||||
"""
|
||||
templar.available_variables = variables or {}
|
||||
quoted_expression = "{0}{1}{2}".format("{{", expression, "}}")
|
||||
open_br = "{{"
|
||||
close_br = "}}"
|
||||
quoted_expression = f"{open_br}{expression}{close_br}"
|
||||
if hasattr(templar, "evaluate_expression"):
|
||||
# This is available since the Data Tagging PR has been merged
|
||||
return templar.evaluate_expression(_make_safe(expression))
|
||||
|
||||
Reference in New Issue
Block a user