From: Simon Marchi Date: Wed, 29 Oct 2025 17:49:23 +0000 (-0400) Subject: gdb/testsuite: use "not in" in Python files X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=93029c6b50f24209790349e11198de47f412139b;p=thirdparty%2Fbinutils-gdb.git 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 --- 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