Skip to content

Commit 013d0b1

Browse files
committed
Update type hint for prepare_comment argument
Replaces the use of the PEP 604 union operator (|) with typing.Union for compatibility. This change ensures the code works with Python versions prior to 3.10.
1 parent 9edfd2c commit 013d0b1

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tests/inspect-ai/scripts/prepare_comment.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@
22
import json
33
import sys
44
from pathlib import Path
5+
from typing import Union
56

67

7-
def prepare_comment(summary_path: str | Path) -> int:
8+
def prepare_comment(summary_path: Union[str, Path]) -> int:
89
"""
910
Reads summary.json and creates a formatted comment for GitHub PR.
1011

0 commit comments

Comments
 (0)