From 7ebe2c1dcdd1adc0e1afe020bd7723285777003c Mon Sep 17 00:00:00 2001 From: bojiang Date: Thu, 11 Jul 2024 11:35:40 +0800 Subject: [PATCH] fix: broken with Python3.9 --- src/openllm/repo.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/openllm/repo.py b/src/openllm/repo.py index 9371a4c53..450db5ee4 100644 --- a/src/openllm/repo.py +++ b/src/openllm/repo.py @@ -2,6 +2,7 @@ import re import shutil +import typing import pyaml import questionary import typer @@ -129,7 +130,7 @@ def ensure_repo_updated(): GIT_REPO_RE = re.compile(r'git\+https://(?P.+)/(?P.+)/(?P.+?)(@(?P.+))?$') -def parse_repo_url(repo_url: str, repo_name: str | None = None) -> RepoInfo: +def parse_repo_url(repo_url: str, repo_name: typing.Optional[str] = None) -> RepoInfo: """ parse the git repo url to server, owner, repo name, branch >>> parse_repo_url('git+https://github.com/bentoml/bentovllm@main')