Thanks to @bschroeder and @mazeyrat for sending in samples (and @bschroeder for noticing the crucial insight) - the issue with parsing is with continuation lines/expressions wrapped to multiple lines. I’m going to do my best to work around it (ideally for 8.1.19) but for now, avoid patterns like this:
for key in ["abc-%s" % site,
"def-%s" % site,
"ghi-%s" % site]:
Or other continuations with mixed indentation:
def abc2():
doSomething(
a,
)