Skip to content

Commit 25ebdfe

Browse files
[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.
1 parent 65a7317 commit 25ebdfe

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lldb/packages/Python/lldbsuite/test/decorators.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
# System modules
2+
3+
# allow the use of the `list[str]` type hint in Python 3.8
4+
from __future__ import annotations
5+
26
from functools import wraps
37
from packaging import version
48
import ctypes

0 commit comments

Comments
 (0)