Skip to content

Commit

Permalink
fix build issue
Browse files Browse the repository at this point in the history
  • Loading branch information
coderustic committed Nov 24, 2024
1 parent 1729cad commit a60c58e
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions cover_agent/coverage/processor.py
Original file line number Diff line number Diff line change
Expand Up @@ -240,11 +240,9 @@ def filter_report(self, report: CoverageReport, file_pattern: str) -> CoverageRe
for file, coverage in report.file_coverage.items()
if file_pattern in file
}
return CoverageReport(
total_lines = sum(len(cov.covered_lines) + len(cov.missed_lines) for cov in filtered_coverage.values())
total_coverage = (sum(len(cov.covered_lines) for cov in filtered_coverage.values()) / total_lines) if total_lines > 0 else 0.0,
file_coverage=filtered_coverage
)
total_coverage = (sum(len(cov.covered_lines) for cov in filtered_coverage.values()) / total_lines) if total_lines > 0 else 0.0
return CoverageReport(total_coverage = total_coverage, file_coverage=filtered_coverage)

class CoverageProcessorFactory:
"""Factory for creating coverage processors based on tool type."""
Expand Down

0 comments on commit a60c58e

Please sign in to comment.