INNER CODE UNIT · Python
clear_query
Far-Se/tabame · plugins/api-client/main.py:130
def clear_query():
cmd(command="setQuery", text="")
# --------------------------------------------------------------------------
# small utilities
# --------------------------------------------------------------------------
def interpolate(text, env):
if not isinstance(text, str) or not text:
return text
def repl(m):
k = m.group(1).strip()
return str(env.get(k, m.group(0)))
return re.sub(r"\{\{\s*([^}]+?)\s*\}\}", repl, text)