FP for S6663 (index method) and pyspark.sql.Row class

Hi all,

I’ve run the sonar-python test suite on the following code snippet on the latest version of the master branch:

from pyspark.sql import Row

row = Row(name="Alice")
print(row["name"])  # S6663 emitted for this line

The snippet was added to the indexMethod.py module before running the test suite.

Command used:

mvn clean install -DskipTypeshed -P-private

I’m not 100% if this has already been reported.

Have a good day!
Mark

Hi Mark,

Thank you very much for bringing this to our attention. We could reproduce the false positive that you reported. A ticket has been created to take care of this issue.

Best regards,
Marc

3 Likes