[Lldb-commits] [lldb] [lldb] Add type hints to gdbclientutils.py (PR #162172)

Daniel Sanders via lldb-commits lldb-commits at lists.llvm.org
Tue Oct 7 15:04:10 PDT 2025


dsandersllvm wrote:

> > Everything in this should be python 3.9. The docs say the minimum is 3.8 but there's existing code in this suite that needs 3.9 so I think 3.9 is ok.
> 
> Please cite the things you need 3.9 for and the existing code that requires 3.9.

It's mainly type hints using the subscript operator on the builtin types like `list[str]`. In 3.8 the correct way is:
```
from typing import List

var:  List[str]
```
The 3.9 version of this is used a lot in dap_server.py, lldbdap_testcase.py, and a little in decorators.py

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


More information about the lldb-commits mailing list