From 6037e0f4e94237534089f7eba24905e21fd40ac0 Mon Sep 17 00:00:00 2001 From: Chris Peterson Date: Wed, 4 Sep 2024 12:16:35 -0700 Subject: [PATCH] ci: allow null compare in check-yaml-fields script Allow check for `None` type in check-yaml-fields.py script. It wasn't clear from the original commit - 2ddde49a4 - if we purposefully didn't want to compare `null` in the script, or it was just a typo. This will now let us assert a field should be `null` instead of some other value, and fail properly when it is not. --- scripts/check-yaml-fields.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/scripts/check-yaml-fields.py b/scripts/check-yaml-fields.py index 821b53c29..73e902fc9 100644 --- a/scripts/check-yaml-fields.py +++ b/scripts/check-yaml-fields.py @@ -27,8 +27,7 @@ def main(): v = v[index] if expected is None: print(v) - else: - assert v == expected, "{!r} != {!r}".format(v, expected) + assert v == expected, "{!r} != {!r}".format(v, expected) main()