fix: variable not found #26144 (#26155)

Signed-off-by: -LAN- <laipz8200@outlook.com>
Co-authored-by: lix43 <lix43@chinatelecom.cn>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: -LAN- <laipz8200@outlook.com>
This commit is contained in:
sqewad 2025-09-29 18:15:05 +08:00 • committed by GitHub
commit 6462328620
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 130 additions and 4 deletions

View file

@ -142,6 +142,8 @@ def build_segment(value: Any, /) -> Segment:
# below
if value is None:
return NoneSegment()
if isinstance(value, Segment):
return value
if isinstance(value, str):
return StringSegment(value=value)
if isinstance(value, bool):