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 __init__.py files.
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.
On the coverage front it might be possible that the rule comes in place if there are only comments and a docstring … I took a quick look and could not find a recent sonar report with the coverage issue but I’ve had complaints about that in the past.