Skip to content

Commit 8279be2

Browse files
committed
Eliminate type casting in compute_coverage
1 parent 008b1b7 commit 8279be2

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

coverage_comment/coverage.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
import json
77
import pathlib
88
from collections.abc import Sequence
9-
from typing import cast
109

1110
from coverage_comment import log, subprocess
1211

@@ -92,8 +91,6 @@ def compute_coverage(
9291
num_branches_total: int = 0,
9392
) -> decimal.Decimal:
9493
"""Compute the coverage percentage, with or without branch coverage."""
95-
num_branches_covered = cast(int, num_branches_covered)
96-
num_branches_total = cast(int, num_branches_total)
9794
numerator = decimal.Decimal(num_covered + num_branches_covered)
9895
denominator = decimal.Decimal(num_total + num_branches_total)
9996
if denominator == 0:

0 commit comments

Comments
 (0)