Skip to content

Commit 3e81997

Browse files
zzl0facebook-github-bot
authored andcommitted
alerts: make it compatible with Python3.8 (#838)
Summary: `re.Pattern[str]` is not valid in Python 3.8 Pull Request resolved: #838 Test Plan: ``` Python 3.8.17 (default, Jul 9 2023, 20:57:35) [Clang 14.0.3 (clang-1403.0.22.14.1)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import re >>> from typing import Optional >>> show_after_crashes_regex: Optional[re.Pattern[str]] = None Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: 'type' object is not subscriptable >>> show_after_crashes_regex: Optional[re.Pattern] = None >>> ``` Reviewed By: zzl0 Differential Revision: D53903964 fbshipit-source-id: 412f4ad5d6011b0da70c47f31f6c919b9c6a8037
1 parent 585a276 commit 3e81997

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

eden/scm/sapling/alerts.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ class Alert(NamedTuple):
1717
description: str
1818
key: str
1919
show_in_isl: bool
20-
show_after_crashes_regex: Optional[re.Pattern[str]]
20+
show_after_crashes_regex: Optional[re.Pattern]
2121

2222

2323
def parse_alert(ui, key: str, raw_alert: dict) -> Optional[Alert]:

0 commit comments

Comments
 (0)