Reformat Python code with ruff
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import gdb
|
||||
|
||||
|
||||
class PersonPrinter:
|
||||
"Print a Person"
|
||||
|
||||
@@ -11,6 +12,7 @@ class PersonPrinter:
|
||||
def to_string(self):
|
||||
return "{} is {} years old.".format(self.name, self.age)
|
||||
|
||||
|
||||
def lookup(val):
|
||||
lookup_tag = val.type.tag
|
||||
if lookup_tag is None:
|
||||
@@ -20,4 +22,5 @@ def lookup(val):
|
||||
|
||||
return None
|
||||
|
||||
|
||||
gdb.current_objfile().pretty_printers.append(lookup)
|
||||
|
||||
Reference in New Issue
Block a user