diff options
| author | Jakub Beránek <berykubik@gmail.com> | 2024-12-04 23:02:25 +0100 |
|---|---|---|
| committer | Jakub Beránek <berykubik@gmail.com> | 2024-12-04 23:03:44 +0100 |
| commit | 536516f949ff37b0e10eaed835c2d3592d03e576 (patch) | |
| tree | 5811d54160e531815b45a9e83463b07f4ba3905f /tests/debuginfo | |
| parent | 0b737a163eb47e9eb6e6c461159764758722e6f9 (diff) | |
| download | rust-536516f949ff37b0e10eaed835c2d3592d03e576.tar.gz rust-536516f949ff37b0e10eaed835c2d3592d03e576.zip | |
Reformat Python code with `ruff`
Diffstat (limited to 'tests/debuginfo')
| -rw-r--r-- | tests/debuginfo/auxiliary/dependency-with-embedded-visualizers.py | 3 | ||||
| -rw-r--r-- | tests/debuginfo/embedded-visualizer-point.py | 3 | ||||
| -rw-r--r-- | tests/debuginfo/embedded-visualizer.py | 3 |
3 files changed, 9 insertions, 0 deletions
diff --git a/tests/debuginfo/auxiliary/dependency-with-embedded-visualizers.py b/tests/debuginfo/auxiliary/dependency-with-embedded-visualizers.py index 2635ed487c8..9e801699fcc 100644 --- a/tests/debuginfo/auxiliary/dependency-with-embedded-visualizers.py +++ b/tests/debuginfo/auxiliary/dependency-with-embedded-visualizers.py @@ -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) diff --git a/tests/debuginfo/embedded-visualizer-point.py b/tests/debuginfo/embedded-visualizer-point.py index d6b1af00785..5f42957b1f8 100644 --- a/tests/debuginfo/embedded-visualizer-point.py +++ b/tests/debuginfo/embedded-visualizer-point.py @@ -1,5 +1,6 @@ import gdb + class PointPrinter: "Print a Point" @@ -11,6 +12,7 @@ class PointPrinter: def to_string(self): return "({}, {})".format(self.x, self.y) + 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) diff --git a/tests/debuginfo/embedded-visualizer.py b/tests/debuginfo/embedded-visualizer.py index 8e4fab61614..5fdbbda2188 100644 --- a/tests/debuginfo/embedded-visualizer.py +++ b/tests/debuginfo/embedded-visualizer.py @@ -1,5 +1,6 @@ import gdb + class LinePrinter: "Print a Line" @@ -11,6 +12,7 @@ class LinePrinter: def to_string(self): return "({}, {})".format(self.a, self.b) + 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) |
