diff options
author | Tom de Vries <tdevries@suse.de> | 2023-11-23 07:37:19 +0100 |
---|---|---|
committer | Tom de Vries <tdevries@suse.de> | 2023-11-23 07:37:19 +0100 |
commit | dd5516bf98fdb8acf242dbeabe8f6b20aafd842f (patch) | |
tree | 9796857aa8d112a4160eb962d097d836de93173d /gdb/python | |
parent | a54a99a6e5159e4406e172f074b3729b2135c28c (diff) | |
download | gdb-dd5516bf98fdb8acf242dbeabe8f6b20aafd842f.zip gdb-dd5516bf98fdb8acf242dbeabe8f6b20aafd842f.tar.gz gdb-dd5516bf98fdb8acf242dbeabe8f6b20aafd842f.tar.bz2 |
[gdb/python] Reformat missing_debug.py using black
Reformat gdb/python/lib/gdb/missing_debug.py with black after commit
e8c3dafa5f5 ("[gdb/python] Don't import curses.ascii module unless necessary").
Diffstat (limited to 'gdb/python')
-rw-r--r-- | gdb/python/lib/gdb/missing_debug.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gdb/python/lib/gdb/missing_debug.py b/gdb/python/lib/gdb/missing_debug.py index b693bf2..7a768e5 100644 --- a/gdb/python/lib/gdb/missing_debug.py +++ b/gdb/python/lib/gdb/missing_debug.py @@ -19,18 +19,22 @@ MissingDebugHandler base class, and register_handler function. import gdb import sys + if sys.version_info >= (3, 7): # Functions str.isascii() and str.isalnum are available starting Python # 3.7. def isascii(ch): return ch.isascii() + def isalnum(ch): return ch.isalnum() + else: # Fall back to curses.ascii.isascii() and curses.ascii.isalnum() for # earlier versions. from curses.ascii import isascii, isalnum + def _validate_name(name): """Validate a missing debug handler name string. |