Description
SIM108 auto-fix changes quote style of nested f-string unnecessarily.
Versions
Python version: 3.12
Ruff version: v0.1.14
Reproduce
Playground link: https://play.ruff.rs/1519e519-94fc-412f-abbb-c8c838a698e7
Given the following:
if 1:
a = f"# {"".join([])}"
else:
a = ""
SIM108 autofix converts this to:
a = f"# {''.join([])}" if 1 else ""
Expected:
a = f"# {"".join([])}" if 1 else ""