Skip to content

Commit 83930be

Browse files
[CI] Ensure compatibility with Python 3.8
55436ae broke this on Windows as we only use Python 3.9 there, but the construct is only supported from 3.10 onwards. Use the old Optional type to ensure compatibility.
1 parent 6ac4585 commit 83930be

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

.ci/generate_test_report_lib.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,20 @@
33
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
44
"""Library to parse JUnit XML files and return a markdown report."""
55

6-
from typing import TypedDict
6+
from typing import TypedDict, Optional
77
import platform
88

99
from junitparser import JUnitXml, Failure
1010

1111

1212
# This data structure should match the definition in llvm-zorg in
1313
# premerge/advisor/advisor_lib.py
14+
# TODO(boomanaiden154): Drop the Optional here and switch to str | None when
15+
# we require Python 3.10.
1416
class FailureExplanation(TypedDict):
1517
name: str
1618
explained: bool
17-
reason: str | None
19+
reason: Optional[str]
1820

1921

2022
SEE_BUILD_FILE_STR = "Download the build's log file to see the details."

0 commit comments

Comments
 (0)