[all-commits] [llvm/llvm-project] b358af: [lldb] Add type hints to gdbclientutils.py and use...

Daniel Sanders via All-commits all-commits at lists.llvm.org
Tue Oct 14 11:16:41 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: b358af10a7b783e771a1e5ad6ded3e3535648b06
      https://github.com/llvm/llvm-project/commit/b358af10a7b783e771a1e5ad6ded3e3535648b06
  Author: Daniel Sanders <daniel_l_sanders at apple.com>
  Date:   2025-10-14 (Tue, 14 Oct 2025)

  Changed paths:
    M lldb/packages/Python/lldbsuite/test/gdbclientutils.py

  Log Message:
  -----------
  [lldb] Add type hints to gdbclientutils.py and use abstract base class (#162172)

Everything in this commit should be python 3.8 compatible which has
required using older styles of type hints (e.g. `Optional[T]` rather
than 3.10's `T | None` and `List[T]` rather than 3.9's `list[T]`. There
are some python 3.9 type hints in other files which have not been
changed by this commit.

Issues:
qEcho() is passed an argument by the callers that the function didn't
have Several functions in the base class would silently do nothing if
not overriden. These now use `@abstractmethod` to require overrides
sendall() had inconsistent return types between overrides

Compatibility was checked with:
```
uvx vermin -t 3.8 $(find lldb/packages/Python -name '*.py')
```
Compability of the type hints was checked with:
```
uvx vermin -t 3.8 --eval-annotations $(find lldb/packages/Python -name '*.py')
```
and type hint correctness was checked with
```
uvx pyright lldb/packages/Python/lldbsuite/test/gdbclientutils.py
```



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