From 93029c6b50f24209790349e11198de47f412139b Mon Sep 17 00:00:00 2001 From: Simon Marchi Date: Wed, 29 Oct 2025 13:49:23 -0400 Subject: [PATCH] gdb/testsuite: use "not in" in Python files Fix flake8 warnings like this one: gdb/testsuite/gdb.python/py-send-packet.py:68:12: E713 test for membership should be 'not in' Change-Id: I2b4cc1eeb63ee2fceb8c4264e7d6ce2d22824688 Approved-By: Tom Tromey --- gdb/testsuite/gdb.base/inline-frame-cycle-unwind.py | 2 +- gdb/testsuite/gdb.python/py-send-packet.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/gdb/testsuite/gdb.base/inline-frame-cycle-unwind.py b/gdb/testsuite/gdb.base/inline-frame-cycle-unwind.py index 4eeb8985e1b..55dea989512 100644 --- a/gdb/testsuite/gdb.base/inline-frame-cycle-unwind.py +++ b/gdb/testsuite/gdb.base/inline-frame-cycle-unwind.py @@ -52,7 +52,7 @@ class TestUnwinder(Unwinder): if stack_adjust is None: raise gdb.GdbError("invalid stack_adjust") - if not stop_at_level in [1, 3, 5]: + if stop_at_level not in [1, 3, 5]: raise gdb.GdbError("invalid stop_at_level") sp_desc = pending_frame.architecture().registers().find("sp") diff --git a/gdb/testsuite/gdb.python/py-send-packet.py b/gdb/testsuite/gdb.python/py-send-packet.py index 842a305b07b..7b852ed7c9a 100644 --- a/gdb/testsuite/gdb.python/py-send-packet.py +++ b/gdb/testsuite/gdb.python/py-send-packet.py @@ -65,7 +65,7 @@ def run_send_packet_test(): # find them, mark the ones we do find. for thr in threads_xml: id = thr.get("id") - if not id in all_threads: + if id not in all_threads: raise "found unexpected thread in remote thread list" else: all_threads[id] = True -- 2.47.3