[gdb/python] Reformat missing_debug.py using black
Reformat gdb/python/lib/gdb/missing_debug.py with black after commit
e8c3dafa5f ("[gdb/python] Don't import curses.ascii module unless necessary").
This commit is contained in:
@@ -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.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user