Variable defined in Python set comprehension is incorrectly reported as undefined

Using SonarCloud, a line similar to this:

f"       count={len({ for m in})}\n"

is incorrectly reported as L329, m is not defined.

Hi @shields-fn,
Thank you for reporting this false positive.
I created to keep track of it.
We plan to have a fix for it in the next release of our Python analyzer (v2.5).

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.