[all-commits] [llvm/llvm-project] f10ede: [lldb/script] Add type hints to scripted extension...

Med Ismail Bennani via All-commits all-commits at lists.llvm.org
Wed Jul 15 09:23:22 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: f10ede511119d7f31f2c6aaca3cbcb1ea00164ce
      https://github.com/llvm/llvm-project/commit/f10ede511119d7f31f2c6aaca3cbcb1ea00164ce
  Author: Med Ismail Bennani <ismail at bennani.ma>
  Date:   2026-07-15 (Wed, 15 Jul 2026)

  Changed paths:
    M lldb/examples/python/templates/operating_system.py
    M lldb/examples/python/templates/scripted_breakpoint.py
    M lldb/examples/python/templates/scripted_frame_provider.py
    M lldb/examples/python/templates/scripted_hook.py
    M lldb/examples/python/templates/scripted_platform.py
    M lldb/examples/python/templates/scripted_process.py
    M lldb/examples/python/templates/scripted_thread_plan.py

  Log Message:
  -----------
  [lldb/script] Add type hints to scripted extension base classes (#209680)

This patch adds type annotations to every method (parameters and return
types) and every `self.<name>` attribute of the scripted extension base
classes shipped under `lldb/examples/python/templates/`. Extension
authors reading the base classes -- or an IDE navigating them -- can now
see the `lldb.SB*` contract each method exposes without having to
cross-reference the docstring.

`scripting extension generate` also picks the annotations up: derived
class docstrings advertise each inherited attribute together with its
declared type, and the generated method signatures carry their parameter
and return annotations too.

The classes covered are `ScriptedProcess`, `ScriptedThread`,
`ScriptedFrame`, `PassthroughScriptedProcess`,
`PassthroughScriptedThread`, `ScriptedFrameProvider`,
`ScriptedBreakpointResolver`, `ScriptedThreadPlan`, `ScriptedHook`,
`ScriptedPlatform`, and `OperatingSystem`.

Signed-off-by: Med Ismail Bennani <ismail at bennani.ma>



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list