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 <jmulligan@redhat.com>
This commit is contained in:
John Mulligan 2023-01-11 09:47:55 -05:00 committed by mergify[bot]
parent 5e369f2546
commit 36f65ce31d
1 changed files with 1 additions and 4 deletions

View File

@ -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. "