Skip to content

Commit 1ca284e

Browse files
committed
ci: fix legacy python supoprt in generate-nightly-index.py
Signed-off-by: Shengqi Chen <[email protected]>
1 parent 47245d1 commit 1ca284e

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

.buildkite/scripts/generate-nightly-index.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,17 @@
22
# SPDX-License-Identifier: Apache-2.0
33
# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
44

5-
# stop ruff from complaining about line length (in comments)
5+
# do not complain about line length (for docstring)
66
# ruff: noqa: E501
7+
# this script should run with legacy python on buildkite agent
8+
# ruff: noqa: UP045
79

810
import argparse
911
import json
1012
import re
1113
from dataclasses import asdict, dataclass
1214
from pathlib import Path
13-
from typing import Any
15+
from typing import Any, Optional
1416
from urllib.parse import quote
1517

1618
INDEX_HTML_TEMPLATE = """<!DOCTYPE html>
@@ -27,11 +29,11 @@
2729
class WheelFileInfo:
2830
package_name: str
2931
version: str
30-
build_tag: str | None
32+
build_tag: Optional[str]
3133
python_tag: str
3234
abi_tag: str
3335
platform_tag: str
34-
variant: str | None
36+
variant: Optional[str]
3537
filename: str
3638

3739

@@ -123,8 +125,8 @@ def generate_index_and_metadata(
123125
whl_files: list[str],
124126
wheel_base_dir: Path,
125127
index_base_dir: Path,
126-
default_variant: str | None = None,
127-
alias_to_default: str | None = None,
128+
default_variant: Optional[str] = None,
129+
alias_to_default: Optional[str] = None,
128130
):
129131
"""
130132
Generate index for all wheel files.

0 commit comments

Comments
 (0)