I have a python program that imports other files which potentially import other files, as is normal with python development
The problem is, when I measure coverage with coverage.py, some files which are imported but not used, get coverage "hits" on the def and import statements.
My question is: is there are way to avoid those hits? For my particular application these hits are considered noise.
Since coverage.py does not provide this feature, my solution was to write a small ast based function that calculate ghost hit points and remove them from the the coverage.py results
With coverage.py, how to skip coverage of import and def statements