[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:
patchback[bot]
2025-11-23 08:58:57 +01:00
committed by GitHub
parent 084ecd96e1
commit f648dca84a
5 changed files with 12 additions and 10 deletions

View File

@@ -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))