Python: Fix all metrics-related compilation failures

In hindsight, having a `.getMetrics()` method that just returns `this`
is somewhat weird. It's possible that it predates the existence of the
inline cast, however.
This commit is contained in:
Taus
2025-11-26 17:03:03 +00:00
parent c75329d7b7
commit 24a29f46be
34 changed files with 82 additions and 51 deletions

View File

@@ -11,9 +11,10 @@
*/
import python
private import LegacyPointsTo
from Module m, ModuleMetrics mm
where mm = m.getMetrics() and mm.getNumberOfLines() > 0
select m,
from ModuleMetrics mm
where mm.getNumberOfLines() > 0
select mm,
100.0 * (mm.getNumberOfLinesOfDocStrings().(float) / mm.getNumberOfLines().(float)) as ratio
order by ratio desc