Skip to content

Commit 0bbd8fd

Browse files
authored
[ci] mark github.Repository as typechecking (#58582)
so that importing test.py does not always import github github repo imports jwt, which then imports cryptography and can lead to issues on windows. Signed-off-by: Lonnie Liu <[email protected]>
1 parent 208970b commit 0bbd8fd

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

release/ray_release/test.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,14 @@
88
import time
99
from dataclasses import dataclass
1010
from itertools import chain
11-
from typing import Awaitable, Dict, List, Optional, Set
11+
from typing import TYPE_CHECKING, Awaitable, Dict, List, Optional, Set
1212

1313
import aioboto3
1414
import boto3
1515
from botocore.exceptions import ClientError
16-
from github import Repository
16+
17+
if TYPE_CHECKING:
18+
from github import Repository
1719

1820
from ray_release.aws import s3_put_rayci_test_data
1921
from ray_release.configs.global_config import get_global_config
@@ -355,7 +357,7 @@ def _get_test_targets_per_file(
355357
except subprocess.CalledProcessError:
356358
return set()
357359

358-
def is_jailed_with_open_issue(self, ray_github: Repository) -> bool:
360+
def is_jailed_with_open_issue(self, ray_github: "Repository") -> bool:
359361
"""
360362
Returns whether this test is jailed with open issue.
361363
"""

0 commit comments

Comments
 (0)