From ffd1aa12992c2272b950cc6c882674e0c07bc8e8 Mon Sep 17 00:00:00 2001 From: "FeRD (Frank Dana)" Date: Fri, 13 Sep 2024 15:13:27 -0400 Subject: [PATCH] Properly default branch counts to 0 --- coverage_comment/coverage.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/coverage_comment/coverage.py b/coverage_comment/coverage.py index 7775f677..591e9de9 100644 --- a/coverage_comment/coverage.py +++ b/coverage_comment/coverage.py @@ -161,8 +161,8 @@ def _make_coverage_info(data: dict) -> CoverageInfo: ), missing_lines=data["missing_lines"], excluded_lines=data["excluded_lines"], - num_branches=data.get("num_branches"), - num_partial_branches=data.get("num_partial_branches"), + num_branches=data.get("num_branches", 0), + num_partial_branches=data.get("num_partial_branches", 0), covered_branches=data.get("covered_branches", 0), missing_branches=data.get("missing_branches", 0), )