Skip to content

Commit 275ef06

Browse files
committed
Fix optional data from deps.dev
1 parent b5c8960 commit 275ef06

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

main.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -155,9 +155,8 @@ def fetch_checks_for_package(package_name):
155155
checks = {}
156156
try:
157157
for project in data["version"]["projects"]:
158-
if "scorecardV2" in project:
159-
scorecard = project["scorecardV2"]
160-
for check in scorecard["check"]:
158+
if scorecard := project.get("scorecardV2"):
159+
for check in scorecard.get("check", None) or ():
161160
check_name = check["name"]
162161
check_score = check["score"]
163162

0 commit comments

Comments
 (0)