From ee42e7ec0c24499d88efbfaff584de38e88507e0 Mon Sep 17 00:00:00 2001 From: Shinichi Hemmi <50256998+Alnusjaponica@users.noreply.github.com> Date: Thu, 28 Sep 2023 15:22:28 +0900 Subject: [PATCH] Use `Optional` instead of `Union[*, None]` Co-authored-by: Gen <54583542+gen740@users.noreply.github.com> --- optuna/integration/sklearn.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/optuna/integration/sklearn.py b/optuna/integration/sklearn.py index 95ce56d672..f5a4b7a329 100644 --- a/optuna/integration/sklearn.py +++ b/optuna/integration/sklearn.py @@ -52,7 +52,7 @@ OneDimArrayLikeType = Union[List[float], np.ndarray, "pd.Series"] TwoDimArrayLikeType = Union[List[List[float]], np.ndarray, "pd.DataFrame", "spmatrix"] IterableType = Union[List, "pd.DataFrame", np.ndarray, "pd.Series", "spmatrix", None] -IndexableType = Union[Iterable, None] +IndexableType = Optional[Iterable] _logger = logging.get_logger(__name__)