From 29bc7136e5e5762d5e46346633c527f0b8c80625 Mon Sep 17 00:00:00 2001 From: budzianowski Date: Tue, 4 Jun 2024 09:55:49 -0700 Subject: [PATCH 1/2] add isort --- Makefile | 2 ++ sim/requirements-dev.txt | 1 + 2 files changed, 3 insertions(+) diff --git a/Makefile b/Makefile index d82903ac..6f99fd30 100755 --- a/Makefile +++ b/Makefile @@ -76,6 +76,7 @@ clean: # ------------------------ # format: + @isort --profile black sim @black sim @ruff format sim .PHONY: format @@ -86,6 +87,7 @@ format-cpp: .PHONY: format-cpp static-checks: + @isort --profile black --check --diff sim @black --diff --check sim @ruff check sim @mypy --install-types --non-interactive sim diff --git a/sim/requirements-dev.txt b/sim/requirements-dev.txt index e36b6486..ea9ccc86 100644 --- a/sim/requirements-dev.txt +++ b/sim/requirements-dev.txt @@ -5,3 +5,4 @@ darglint mypy pytest ruff +isort \ No newline at end of file From dd99ce89aef9a62e3a9508b04c884287b7184e50 Mon Sep 17 00:00:00 2001 From: budzianowski Date: Tue, 4 Jun 2024 10:03:44 -0700 Subject: [PATCH 2/2] isort --- sim/humanoid_gym/envs/legs_config.py | 3 +-- sim/humanoid_gym/envs/legs_env.py | 3 +-- sim/humanoid_gym/envs/stompy_env.py | 3 +-- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/sim/humanoid_gym/envs/legs_config.py b/sim/humanoid_gym/envs/legs_config.py index 2c98a793..8be39bcd 100755 --- a/sim/humanoid_gym/envs/legs_config.py +++ b/sim/humanoid_gym/envs/legs_config.py @@ -3,9 +3,8 @@ from humanoid.envs.base.legged_robot_config import LeggedRobotCfg, LeggedRobotCfgPPO from sim.env import stompy_urdf_path -from sim.stompy.joints import StompyFixed from sim.humanoid_gym.envs.stompy_config import StompyCfg - +from sim.stompy.joints import StompyFixed NUM_JOINTS = len(StompyFixed.default_standing()) # 17 diff --git a/sim/humanoid_gym/envs/legs_env.py b/sim/humanoid_gym/envs/legs_env.py index 8d4e1214..f9fdddf9 100755 --- a/sim/humanoid_gym/envs/legs_env.py +++ b/sim/humanoid_gym/envs/legs_env.py @@ -1,14 +1,13 @@ # mypy: disable-error-code="valid-newtype" """Defines the environment for training the Stompy with fixed torso.""" +import torch from humanoid.envs import LeggedRobot from humanoid.envs.base.legged_robot_config import LeggedRobotCfg from humanoid.utils.terrain import HumanoidTerrain from isaacgym import gymtorch from isaacgym.torch_utils import * -import torch - from sim.stompy.joints import StompyFixed diff --git a/sim/humanoid_gym/envs/stompy_env.py b/sim/humanoid_gym/envs/stompy_env.py index 6b257229..461c9a6a 100755 --- a/sim/humanoid_gym/envs/stompy_env.py +++ b/sim/humanoid_gym/envs/stompy_env.py @@ -1,14 +1,13 @@ # mypy: disable-error-code="valid-newtype" """Defines the environment for training the humanoid.""" +import torch from humanoid.envs import LeggedRobot from humanoid.envs.base.legged_robot_config import LeggedRobotCfg from humanoid.utils.terrain import HumanoidTerrain from isaacgym import gymtorch from isaacgym.torch_utils import * -import torch - from sim.stompy.joints import Stompy