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/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 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