From bbbaad21e828739a20c1bc0aead5e8de94863354 Mon Sep 17 00:00:00 2001 From: Peter Law Date: Sun, 23 Jun 2024 12:55:12 +0100 Subject: [PATCH] Clarify filter by flipping the boolean logic --- test/test_utils.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/test/test_utils.py b/test/test_utils.py index 31637d47..9a1f9110 100644 --- a/test/test_utils.py +++ b/test/test_utils.py @@ -84,8 +84,10 @@ class TestSetupReadline(unittest.TestCase): ] difference = { x for x in difference - if all(not x.startswith('from os import ' + prefix) - for prefix in ACCEPTED_DIFFERENCE_PREFIXES) + if not any( + x.startswith('from os import ' + prefix) + for prefix in ACCEPTED_DIFFERENCE_PREFIXES + ) } # There are quite a few differences, because both Windows and Linux # (posix and nt) libraries are included.