[Lldb-commits] [lldb] [lldb] Declare types of Python synthetic signatures (NFC) (PR #184914)

Ebuka Ezike via lldb-commits lldb-commits at lists.llvm.org
Fri Mar 6 03:01:27 PST 2026


================
@@ -289,11 +289,11 @@ class CommandObjectTypeSummaryAdd : public CommandObjectParsed,
 static const char *g_synth_addreader_instructions =
     "Enter your Python command(s). Type 'DONE' to end.\n"
     "You must define a Python class with these methods:\n"
-    "    def __init__(self, valobj, internal_dict):\n"
-    "    def num_children(self):\n"
-    "    def get_child_at_index(self, index):\n"
-    "    def get_child_index(self, name):\n"
-    "    def update(self):\n"
+    "    def __init__(self, valobj: lldb.SBValue, internal_dict):\n"
+    "    def num_children(self) -> int:\n"
+    "    def get_child_at_index(self, index: int) -> lldb.SBValue:\n"
+    "    def get_child_index(self, name: str) -> int:\n"
+    "    def update(self) -> int | None:\n"
----------------
da-viper wrote:

```suggestion
    "    def get_child_at_index(self, index: int) -> lldb.SBValue | None:\n"
    "    def get_child_index(self, name: str) -> int:\n"
    "    def update(self) -> bool:\n"
```

https://github.com/llvm/llvm-project/pull/184914


More information about the lldb-commits mailing list