S5644 (ItemOperationsTypeCheck) false positive when using python3.12 generic syntax

I just switched from Generic[…]-Syntax to python3.12 generics (mostly motivated by S6792 btw :wink: ) and SonarQube (Community-Version v10.6) now triggers a ton of python:S5644, telling me that e.g. WorkerProcess does not have a getitem method.

Code example:

class WorkerProcess[Item]:
    pass

class ExampleWorker(WorkerProcess[tuple[str, int]]):  # triggers python:S5644
    pass

a = WorkerProcess[str]()  # triggers python:S5644

Hey there!

Thanks for the report. What version(s) of what product(s) ar you using?

I’m using SonarQube Community Edition Version 10.6

Hello @patrickrauscher,

Thanks for the reporting. We have reproduced the issue and created the ticket to fix it.

Cheers,
Maksim Grebeniuk