]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
gdb/testsuite: rename ambiguous variable in py-command-breakpoint.py
authorSimon Marchi <simon.marchi@efficios.com>
Wed, 29 Oct 2025 17:49:24 +0000 (13:49 -0400)
committerSimon Marchi <simon.marchi@efficios.com>
Thu, 30 Oct 2025 16:25:53 +0000 (12:25 -0400)
Fix this flake8 warning:

    gdb/testsuite/gdb.python/py-commands-breakpoint.py:37:13: E741 ambiguous variable name 'l'

This one is a bit subjective, but renaming the variable is easy enough
and the simplest way to get rid of the warning.

Change-Id: I9b1ffd898e27a9d0e172f29715aff3ff3cc785b9
Approved-By: Tom Tromey <tom@tromey.com>
gdb/testsuite/gdb.python/py-commands-breakpoint.py

index dbe7676d6ba342371ce765a4dd73d280f955c6f9..df732e7922af2cb4b889ce0e9d597149acd63120 100644 (file)
@@ -34,10 +34,10 @@ class PyCommandsBreakpoint(gdb.Breakpoint):
 
     def __setattr__(self, name, value):
         if name == "commands":
-            l = ["python PyCommandsBreakpoint.run_py_commands(%d)" % self.number]
+            cmds = ["python PyCommandsBreakpoint.run_py_commands(%d)" % self.number]
             if value != "":
-                l.append(value)
-            value = "\n".join(l)
+                cmds.append(value)
+            value = "\n".join(cmds)
 
         super().__setattr__(name, value)