Commit 3d01f28
committed
fix: correct parent __init__.py path for module files in _is_public_submodule
For a module file mellea/pkg/submodule.py, Griffe gives filepath ending in
.py (not __init__.py). The parent __init__.py is fp.parent/__init__.py.
The previous code used fp.parent.parent which is correct for packages
(whose filepath IS the __init__.py) but goes one level too far for plain
module files — it was checking the grandparent init instead of the parent.
Effect: genslot, react, unit_test_eval and similar non-exported modules
in stdlib/components were incorrectly counted as public symbols, inflating
the denominator and lowering the reported coverage percentage.1 parent 83aed3b commit 3d01f28
1 file changed
Lines changed: 7 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
61 | | - | |
62 | | - | |
63 | | - | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
64 | 68 | | |
65 | 69 | | |
66 | 70 | | |
| |||
0 commit comments