SonarCloud code smell being raised in Python code that is compliant with PEP589 TypedDict

There are custom defined type sub-classes (inheriting from TypedDict) as per PEP589. We also have a workflow that uses the Pyright type checker and 0 errors are raised by this.

  • ALM used: GitHub

  • CI system used: GitHub Actions

  • Scanner command used when applicable:
    - name: SonarCloud Scan
    uses: SonarSource/sonarcloud-github-action@master
    with:
    args: >
    -Dsonar.python.coverage.reportPaths=coverage.xml

  • Languages of the repository: Python

  • Link to PR: BENCH-186: Add openapi documentation by MichaelOSullivanAnswer · Pull Request #63 · AnswerConsulting/AnswerKing-Python · GitHub

  • Error observed:
    Assign to “product_example” a value of type “ProductType” instead of “dict” or update its type hint.

  • Steps to reproduce: Workflow triggered for each new pull request and each push to that branch

  • Potential workaround: None

Hi,

Welcome to the community!

I don’t see any issues raised in that PR.

Could you provide a reproducer and the rule id, please?

 
Ann