diff options
author | Charles Zablit <c_zablit@apple.com> | 2025-09-05 17:25:38 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-09-05 17:25:38 +0100 |
commit | 25ebdfe0ab202a6cb30232d84bc5838439fd67d5 (patch) | |
tree | 8bbd3073d0ea0b08a1bd6e8af61000328845e4f5 /lldb/packages/Python/lldbsuite/test | |
parent | 65a7317234680045b045f3c4155b647faeae4304 (diff) | |
download | llvm-25ebdfe0ab202a6cb30232d84bc5838439fd67d5.zip llvm-25ebdfe0ab202a6cb30232d84bc5838439fd67d5.tar.gz llvm-25ebdfe0ab202a6cb30232d84bc5838439fd67d5.tar.bz2 |
[lldb] fix Python 3.9+ specific typing annotations (#156868)
This patch replaces `list` with its `typing` implementation, i.e
`list[str]` becomes `List[str]`.
[Type hinting generic in the standard collection were introduced in
Python 3.9](https://peps.python.org/pep-0585/), however the minimum
supported Python version for lldb is 3.8. This patch will unblock the
[bots for Ubuntu
20.04](https://ci.swift.org/view/Swift%20rebranch/job/oss-swift-rebranch-package-ubuntu-20_04/2847/consoleText),
which run on Python 3.8.
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test')
-rw-r--r-- | lldb/packages/Python/lldbsuite/test/decorators.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/decorators.py b/lldb/packages/Python/lldbsuite/test/decorators.py index bd10bcc..16a58cf 100644 --- a/lldb/packages/Python/lldbsuite/test/decorators.py +++ b/lldb/packages/Python/lldbsuite/test/decorators.py @@ -1,4 +1,8 @@ # System modules + +# allow the use of the `list[str]` type hint in Python 3.8 +from __future__ import annotations + from functools import wraps from packaging import version import ctypes |