This bug has been fixed in sonar-python 5.9, which was shipped with SonarQube Server 2025.5. However, in connected mode, SonarQube for IDE will use the analyzer version from the connected SonarQube instance, which doesn’t contain the fix yet.
To analyze this file in your IDE, you would have to upgrade to at least SonarQube Server 2025.5. Alternatively, if connected mode is not enabled, the file should parse correctly.