SonarCloud | Advanced setup | Languages | Python
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 > Languages > Python.
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
Related pages
- External Analyzer Reports (Pylint, Bandit, Flake8)
- Test coverage (the Coverage.py tool provided by Ned Batchelder, Nose, pytest)