Python S930 FP with pymssql

Hi there,

We recently noticed the following False-Positive result when attempting to use the 3rd-party pymssql Python package. The connect method has 14 arguments, all with default values. However if you attempt to analyse the following code:

import pymssql


The analysis will raise a Bug for Rule S930 with the message:

Add 13 missing arguments; ‘connect’ expects 14 positional arguments

This is incorrect as the remaining 13 arguments all have default values - no Bug should be raised.

Our SonarQube instance is running version 8.6. I have also reproduced the same issue using SonarLint for VSCode 1.20.1

Thanks in advance,


1 Like

Hi @Sam_Anthonisz,
Thanks for reporting this FP. I created SONARPY-832 to keep track of it.

Note that to get pymssql.connect signature, we rely on typeshed stub definition that seems to unmatch psmssql documentation.

1 Like

Thanks for the prompt reply @Andrea_Guarino!

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