From e875c0d70790c9cabab1954e6351ecef7f41fbbd Mon Sep 17 00:00:00 2001 From: AdilZouitine Date: Wed, 24 Apr 2024 11:26:43 -0400 Subject: [PATCH] Fix formatting issues in walker.py and domain_randomization.py --- rrls/envs/walker.py | 4 +++- rrls/wrappers/domain_randomization.py | 7 +++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/rrls/envs/walker.py b/rrls/envs/walker.py index 598a6b8..f12a05e 100644 --- a/rrls/envs/walker.py +++ b/rrls/envs/walker.py @@ -114,7 +114,9 @@ def set_params( else getattr(self, "thighmass", DEFAULT_PARAMS["thighmass"]) ) self.legmass = ( - legmass if legmass is not None else getattr(self, "legmass", DEFAULT_PARAMS["legmass"]) + legmass + if legmass is not None + else getattr(self, "legmass", DEFAULT_PARAMS["legmass"]) ) self.footmass = ( footmass diff --git a/rrls/wrappers/domain_randomization.py b/rrls/wrappers/domain_randomization.py index d7058be..e7c1da3 100644 --- a/rrls/wrappers/domain_randomization.py +++ b/rrls/wrappers/domain_randomization.py @@ -30,10 +30,9 @@ def __init__( self, env: ModifiedParamsEnv, params_bound: dict[str, Annotated[tuple[float], 2]], - randomize_fn: Callable[ - [dict[str, Annotated[tuple[float], 2]]], dict[str, float] - ] - | None = None, + randomize_fn: ( + Callable[[dict[str, Annotated[tuple[float], 2]]], dict[str, float]] | None + ) = None, ): super().__init__(env) self.env = env