Use code below
class Foo:
@pytest.fixture(autouse=True)
def __setup(self):
self._foo = 'foo'
Expected:
No warning
Actual:
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.
ganncamp
(G Ann Campbell)
January 12, 2023, 5:32pm
2
Hi,
Can you provide your SonarLint flavor and version? And are you using it in connected mode with SonarCloud or SonarQube (which version)?
Ann
I am using SonarLint as a local PyCharm extension in version 7.3.0.59206
ganncamp
(G Ann Campbell)
January 13, 2023, 12:26pm
4
Hi,
Thanks for the details. What’s your SonarLint version?
Ann
How could I check this? In a plugin description I have got only this:
1 Like
ganncamp
(G Ann Campbell)
January 13, 2023, 2:35pm
9
Hi,
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.
Ann
Hello @Grzegorz_Ryznar ,
Thank your for reporting this false positive: I created a ticket SONARPY-1257 to track it.
Best regards,
Rudy Regazzoni