]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
gdb/testsuite: use "not in" in Python files
authorSimon Marchi <simon.marchi@efficios.com>
Wed, 29 Oct 2025 17:49:23 +0000 (13:49 -0400)
committerSimon Marchi <simon.marchi@efficios.com>
Thu, 30 Oct 2025 16:25:53 +0000 (12:25 -0400)
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 <tom@tromey.com>
gdb/testsuite/gdb.base/inline-frame-cycle-unwind.py
gdb/testsuite/gdb.python/py-send-packet.py

index 4eeb8985e1bb91cb5c5e7d8cf72141c7f4a40225..55dea989512c8ca540b514ff53c7c7e22a8d4988 100644 (file)
@@ -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")
index 842a305b07b7232b8afa112a83255bdcd20dbf86..7b852ed7c9aba98f96ef99446c20266e87f27612 100644 (file)
@@ -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