python:S1144 False positive for autoused private fixtures

Use code below

class Foo:
    def __setup(self):
        self._foo = 'foo'

No warning


Use case:
Base class with mangled name of setup to avoid accidental overwriting.

Even if someone writes __setup method in child class, the setup of parent class will be untouched.


Can you provide your SonarLint flavor and version? And are you using it in connected mode with SonarCloud or SonarQube (which version)?


I am using SonarLint as a local PyCharm extension in version


Thanks for the details. What’s your SonarLint version?


How could I check this? In a plugin description I have got only this:

1 Like


Thanks for the screenshot. It confirms that your SonarLint version is the latest. Sorry, but I thought earlier that you were giving your PyCharm version.

I’ve flagged this for the language experts.


Hello @Grzegorz_Ryznar,

Thank your for reporting this false positive: I created a ticket SONARPY-1257 to track it.

Best regards,
Rudy Regazzoni