From 36f65ce31d0d8f315d5fa08d719c3b4b9c90601b Mon Sep 17 00:00:00 2001 From: John Mulligan Date: Wed, 11 Jan 2023 09:47:55 -0500 Subject: [PATCH] contrib: fix and simplify condition for reporting only stable apis When generating the human-readable api-status.md document from the JSON, the logic used to determine if a package had no Preview/Deprecated APIs was incorrect. This change fixes and simplifies that condition. Signed-off-by: John Mulligan --- contrib/apiage.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/contrib/apiage.py b/contrib/apiage.py index 597f1e8..4100816 100755 --- a/contrib/apiage.py +++ b/contrib/apiage.py @@ -277,10 +277,7 @@ def format_markdown(tracked, outfh): ) print("", file=outfh) if all( - x not in pkg_api for x in ("preview_api", "deprecated_api") - ) or all( - x in pkg_api and not pkg_api[x] - for x in ("preview_api", "deprecated_api") + not pkg_api.get(x, []) for x in ("preview_api", "deprecated_api") ): print( "No Preview/Deprecated APIs found. "