Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
lgc2333 authored Oct 27, 2024
1 parent caa7965 commit 1a69da3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/nonebot_plugin_alconna/uniseg/template.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,8 +163,8 @@ def _vformat(
if v in kwargs:
_kwargs[k] = kwargs[v]
used_args.add(v)
elif v.startswith("$") and (key := v.split(".")[0]) in kwargs:
_kwargs[k] = _eval(v[1:], kwargs[key])
elif v.startswith("$") and (key := (stmt := part[1:]).split(".")[0]):
_kwargs[k] = _eval(stmt, kwargs[key])
else:
_kwargs[k] = v
elif part in kwargs:
Expand Down

0 comments on commit 1a69da3

Please sign in to comment.