Details
-
Type:
False-Positive
-
Status: Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: 2.5
-
Component/s: None
-
Labels:None
Description
S3827 is reporting a false positive for variables created in set comprehension inside f-strings.
f"{ {x for x in []} }" # FP : x is not defined
Related community thread: https://community.sonarsource.com/t/variable-defined-in-python-set-comprehension-is-incorrectly-reported-as-undefined/19784