Skip to content

Commit

Permalink
Eliminate type casting in compute_coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
ferdnyc committed Sep 13, 2024
1 parent 008b1b7 commit 8279be2
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions coverage_comment/coverage.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
import json
import pathlib
from collections.abc import Sequence
from typing import cast

from coverage_comment import log, subprocess

Expand Down Expand Up @@ -92,8 +91,6 @@ def compute_coverage(
num_branches_total: int = 0,
) -> decimal.Decimal:
"""Compute the coverage percentage, with or without branch coverage."""
num_branches_covered = cast(int, num_branches_covered)
num_branches_total = cast(int, num_branches_total)
numerator = decimal.Decimal(num_covered + num_branches_covered)
denominator = decimal.Decimal(num_total + num_branches_total)
if denominator == 0:
Expand Down

0 comments on commit 8279be2

Please sign in to comment.