SonarCloud knows how to scan Python 3.10 code: "structural pattern matching" syntax

Hello Python developers,

Python 3.10 (released beginning of Oct 2021) introduces new syntaxes that SonarCloud is now able to parse.

In particular this version 3.10 introduces PEP 634 – Structural Pattern Matching such as:

def fn(value, flag):
  match value:
    case 'foo' if flag
       foo()
    case 'bar':
       bar()

This is now available on SonarCloud and will be in the forthcoming SonarQube 9.2 release.

Alex

3 Likes