While python 3 no longer require the presence of empty
__init__.py files to resolve modules imports, the new behavior is not yet supported by all the tools around python (green for example).
As such we are still including empty
__init__.py as part of our python package structure. Unfortunately we get false positives such as missing docstrings, missing line or branch coverage.
To reproduce simply add empty
__init__.py files to an existing python3 project and observe the issues.
While it is pretty simple to resolve these as false positive, they should not show up in the first place and Sonar should be mostly ignoring empty
We do have a few
__init__.py files that have actual lines of python and we want the general rules to apply to these, so the exclusion is really only for empty files.