diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 5a69727..1e6dcc3 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -2,26 +2,26 @@ repos: # remove unused python imports - repo: https://github.com/myint/autoflake.git - rev: v2.1.1 + rev: v2.3.1 hooks: - id: autoflake args: ["--in-place", "--remove-all-unused-imports", "--ignore-init-module-imports"] # sort imports - repo: https://github.com/timothycrosley/isort - rev: 5.12.0 + rev: 5.13.2 hooks: - id: isort # code format according to black - repo: https://github.com/ambv/black - rev: 24.2.0 + rev: 24.3.0 hooks: - id: black # check for python styling with flake8 - repo: https://github.com/PyCQA/flake8 - rev: 6.0.0 + rev: 7.0.0 hooks: - id: flake8 additional_dependencies: [ @@ -33,6 +33,6 @@ repos: # cleanup notebooks - repo: https://github.com/kynan/nbstripout - rev: 0.6.1 + rev: 0.7.1 hooks: - id: nbstripout diff --git a/gello/dm_control_tasks/arms/manipulator.py b/gello/dm_control_tasks/arms/manipulator.py index 068d786..d251e48 100644 --- a/gello/dm_control_tasks/arms/manipulator.py +++ b/gello/dm_control_tasks/arms/manipulator.py @@ -1,4 +1,5 @@ """Manipulator composer class.""" + import abc from pathlib import Path from typing import Dict, List, Optional, Tuple, Union diff --git a/gello/dm_control_tasks/manipulation/arenas/floors.py b/gello/dm_control_tasks/manipulation/arenas/floors.py index 0a67d60..7814c05 100644 --- a/gello/dm_control_tasks/manipulation/arenas/floors.py +++ b/gello/dm_control_tasks/manipulation/arenas/floors.py @@ -1,4 +1,5 @@ """Simple floor arenas.""" + from typing import Tuple import numpy as np diff --git a/gello/dm_control_tasks/manipulation/tasks/block_play.py b/gello/dm_control_tasks/manipulation/tasks/block_play.py index 09589a0..5d4135e 100644 --- a/gello/dm_control_tasks/manipulation/tasks/block_play.py +++ b/gello/dm_control_tasks/manipulation/tasks/block_play.py @@ -1,4 +1,5 @@ """A task where a walker must learn to stand.""" + from typing import Optional import numpy as np diff --git a/gello/robots/dynamixel.py b/gello/robots/dynamixel.py index 67e9d4b..96d3897 100644 --- a/gello/robots/dynamixel.py +++ b/gello/robots/dynamixel.py @@ -86,11 +86,14 @@ def __init__( if gripper_config is not None: current_joints = current_joints[:-1] start_joints = start_joints[:-1] - for idx, (c_joint, s_joint, joint_offset) in enumerate(zip( - current_joints, start_joints, self._joint_offsets - )): + for idx, (c_joint, s_joint, joint_offset) in enumerate( + zip(current_joints, start_joints, self._joint_offsets) + ): new_joint_offsets.append( - np.pi * 2 * np.round((-s_joint + c_joint) / (2 * np.pi)) * self._joint_signs[idx] + np.pi + * 2 + * np.round((-s_joint + c_joint) / (2 * np.pi)) + * self._joint_signs[idx] + joint_offset ) if gripper_config is not None: