mirror of
https://github.com/github/codeql.git
synced 2025-12-17 01:03:14 +01:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user