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

Commit b8e6f34

Browse files
authored
Remove usage of additional Report.get arguments (#1137)
1 parent 4a44e42 commit b8e6f34

1 file changed

Lines changed: 2 additions & 5 deletions

File tree

helpers/reports.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,12 @@
1-
from collections import namedtuple
2-
31
from shared.config import get_config
42
from shared.yaml import UserYaml
53

64
from services.yaml.reader import read_yaml_field
75

8-
null = namedtuple("_", ["totals"])(None)
9-
106

117
def get_totals_from_file_in_reports(report, path):
12-
return report.get(path, null).totals
8+
file = report.get(path)
9+
return file.totals if file else None
1310

1411

1512
def delete_archive_setting(commit_yaml: UserYaml | dict) -> bool:

0 commit comments

Comments
 (0)