[Lldb-commits] [lldb] [lldb] Update formatter_bytecode.py to ABI version 2 (PR #229923)
via lldb-commits
lldb-commits at lists.llvm.org
Wed Oct 7 15:02:02 PDT 2026
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {darker}-->
:warning: Python code formatter, darker found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
darker --check --diff -r origin/main...HEAD lldb/examples/python/formatter_bytecode.py
``````````
:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:
</details>
<details>
<summary>
View the diff from darker here.
</summary>
``````````diff
--- formatter_bytecode.py 2026-10-07 21:57:05.000000 +0000
+++ formatter_bytecode.py 2026-10-07 22:01:22.532443 +0000
@@ -1403,11 +1403,10 @@
dis = io.StringIO()
disassemble_file(binary, dis)
self.assertEqual(dis.getvalue(), "@summary: return\n")
class TestCompiler(unittest.TestCase):
-
class FakeValue:
"""A minimal stand-in for SBValue."""
def __init__(self, value=0, children=None):
self.value = value
@@ -1432,11 +1431,12 @@
assembly = Compiler().compile(f.name)
section = assemble_file("T", io.StringIO(assembly))
return dict(section.signatures)
def test_synthetic(self):
- methods = self.compile_methods("""
+ methods = self.compile_methods(
+ """
import lldb
class Synthetic:
def __init__(self, valobj, _):
self.valobj = valobj
@@ -1453,11 +1453,12 @@
def get_child_at_index(self, idx):
if idx < self.count:
return self.storage.GetChildAtIndex(idx)
return None
- """)
+ """
+ )
FakeValue = self.FakeValue
a, b = FakeValue(10), FakeValue(20)
valobj = FakeValue(
children={
``````````
</details>
https://github.com/llvm/llvm-project/pull/229923
More information about the lldb-commits
mailing list