#9390·kivy

KV f-string name extraction crashes on boolean expressions

Author: AGFACBNNRCreated Oct 1, 2026Updated Oct 1, 2026

Name extraction for an f-string such as f"{a or b}" raises AttributeError.

python
import ast
from kivy.lang.parser import ParserRuleProperty

expression = ast.parse('f"{a or b}"').body[0].value
list(ParserRuleProperty.get_names_from_expression(expression))
# AttributeError: 'Name' object has no attribute 'value'

Expected: extract a and b without an exception.

The shared JoinedStr/BoolOp branch reads n.value for every element. BoolOp.values contains expression nodes, including Name, so those elements should be traversed directly.

Reproduced using the original Python method in isolation.