From 9b073d63bc8f367097d636d257ad94c12796fc3b Mon Sep 17 00:00:00 2001 From: aisha-partha <153170327+aisha-partha@users.noreply.github.com> Date: Wed, 22 May 2024 18:57:12 +0530 Subject: [PATCH] Source code formatting change in optuna/storages/_rdb/models.py --- optuna/storages/_rdb/models.py | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/optuna/storages/_rdb/models.py b/optuna/storages/_rdb/models.py index 41b9f1c138..ef435e9ba7 100644 --- a/optuna/storages/_rdb/models.py +++ b/optuna/storages/_rdb/models.py @@ -258,10 +258,7 @@ def find_or_raise_by_id( @classmethod def count( - cls, - session: orm.Session, - study: StudyModel | None = None, - state: TrialState | None = None, + cls, session: orm.Session, study: StudyModel | None = None, state: TrialState | None = None ) -> int: trial_count = session.query(func.count(cls.trial_id)) if study is not None: @@ -427,10 +424,7 @@ class TrialValueType(enum.Enum): ) @classmethod - def value_to_stored_repr( - cls, - value: float, - ) -> tuple[float | None, TrialValueType]: + def value_to_stored_repr(cls, value: float) -> tuple[float | None, TrialValueType]: if value == float("inf"): return (None, cls.TrialValueType.INF_POS) elif value == float("-inf"): @@ -494,8 +488,7 @@ class TrialIntermediateValueType(enum.Enum): @classmethod def intermediate_value_to_stored_repr( - cls, - value: float, + cls, value: float ) -> tuple[float | None, TrialIntermediateValueType]: if math.isnan(value): return (None, cls.TrialIntermediateValueType.NAN)