aboutsummaryrefslogtreecommitdiff
path: root/gdb/python
diff options
context:
space:
mode:
authorTom Tromey <tromey@adacore.com>2025-05-13 15:02:04 -0600
committerTom Tromey <tromey@adacore.com>2025-05-14 07:07:29 -0600
commit475799b692ebc46cfb938028c1cba6792dd5d23f (patch)
tree7d69999a9e8c7db7e05c42592b4b7d797f8d15ba /gdb/python
parentc6c8d0b82175226b0e87904b613fbac3e704cc28 (diff)
downloadbinutils-475799b692ebc46cfb938028c1cba6792dd5d23f.zip
binutils-475799b692ebc46cfb938028c1cba6792dd5d23f.tar.gz
binutils-475799b692ebc46cfb938028c1cba6792dd5d23f.tar.bz2
Fix some pre-commit nits in gdb/__init__.py
I noticed that pre-commit has some complaints (flake8 and codespell) about gdb/__init__.py. This patch fixes these. Approved-By: Tom de Vries <tdevries@suse.de>
Diffstat (limited to 'gdb/python')
-rw-r--r--gdb/python/lib/gdb/__init__.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/gdb/python/lib/gdb/__init__.py b/gdb/python/lib/gdb/__init__.py
index 866c312..69c15b1 100644
--- a/gdb/python/lib/gdb/__init__.py
+++ b/gdb/python/lib/gdb/__init__.py
@@ -408,10 +408,10 @@ class ParameterPrefix:
# string. Users are expected to sub-class this ParameterPrefix class
# and add their own documentation. If they don't, then GDB will
# generate a suitable doc string. But, if this (parent) class has a
- # __doc__ sting of its own, then sub-classes will inherit that __doc__
+ # __doc__ string of its own, then sub-classes will inherit that __doc__
# string, and GDB will not understand that it needs to generate one.
- class _PrefixCommand(Command):
+ class _PrefixCommand(_gdb.Command):
"""A gdb.Command used to implement both the set and show prefixes.
This documentation string is not used as the prefix command
@@ -490,7 +490,7 @@ class ParameterPrefix:
self.__doc__ = doc
self.__cb = self.__find_callback(delegate, mode)
self.__delegate = delegate
- if not self.__cb is None:
+ if self.__cb is not None:
self.invoke = self.__invoke
super().__init__(mode + " " + name, cmd_class, prefix=True)