SonarCloud | Advanced setup | Languages | Python

Was this page helpful?

On this page

Start FreeLog in

Python

Supported versions

  • Python 3.X
  • Python 2.X

Language-specific properties

Discover and update the Python-specific properties in the project Administration > General Settings > LanguagesPython.

Handling project python version

Python code is analyzed by default as compatible with python 2 and python 3. Some issues will be automatically silenced to avoid raising False Positives. In order to get a more precise analysis you can specify the python versions your code supports via the sonar.python.version parameter.

Accepted format are a comma separated list of versions having the format "X.Y"

Examples:

  • sonar.python.version=2.7
  • sonar.python.version=3.8
  • sonar.python.version=2.7, 3.7, 3.8, 3.9

© 2008-2024 SonarSource SA. All rights reserved. SONAR, SONARSOURCE, SONARLINT, SONARQUBE, SONARCLOUD, and CLEAN AS YOU CODE are trademarks of SonarSource SA.

Creative Commons License