Skip to content
This repository was archived by the owner on Jun 13, 2025. It is now read-only.

Commit 3f7f245

Browse files
return types
1 parent 600f529 commit 3f7f245

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

api/public/v2/pull/serializers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ def get_patch(self, obj: Pull) -> Optional[Dict[str, float]]:
5454
misses += pc.misses
5555
partials += pc.partials
5656
total_branches = hits + misses + partials
57-
coverage = 0
57+
coverage = 0.0
5858
if total_branches != 0:
5959
coverage = round(100 * hits / total_branches, 2)
6060
data = dict(

services/comparison.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1248,7 +1248,7 @@ def _load_commit(self, commit_id: int) -> Optional[Commit]:
12481248
)
12491249

12501250
@staticmethod
1251-
def get_commit_comparison_for_pull(obj: Pull):
1251+
def get_commit_comparison_for_pull(obj: Pull) -> Optional[CommitComparison]:
12521252
comparison_qs = CommitComparison.objects.filter(
12531253
base_commit__commitid=obj.compared_to,
12541254
compare_commit__commitid=obj.head,

0 commit comments

Comments
 (0)