diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml index cbe3d343..e59074d6 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit.yml @@ -13,9 +13,9 @@ jobs: pre-commit: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - uses: actions/setup-python@v4 - - run: python -m pip install pre-commit - - run: python -m pre_commit --version - - run: python -m pre_commit install - - run: python -m pre_commit run --all-files + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + - run: pipx install pre-commit + - run: pre-commit --version + - run: pre-commit install + - run: pre-commit run --all-files diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 38f51360..bee4a8f0 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -11,7 +11,7 @@ repos: args: - --ignore-words-list=nd,reacher,thist,ths, arry - repo: https://github.com/pycqa/flake8 - rev: 4.0.1 + rev: 7.1.1 hooks: - id: flake8 args: diff --git a/gymnasium_robotics/__init__.py b/gymnasium_robotics/__init__.py index 726e5cdf..6d5b4077 100644 --- a/gymnasium_robotics/__init__.py +++ b/gymnasium_robotics/__init__.py @@ -850,7 +850,7 @@ def _merge(a, b): register( id=f"AntMaze_Open{suffix}-{version}", - entry_point="gymnasium_robotics.envs.maze.ant_maze:AntMazeEnv", + entry_point=f"gymnasium_robotics.envs.maze.ant_maze_{version}:AntMazeEnv", kwargs=_merge( { "maze_map": maps.OPEN, @@ -862,7 +862,7 @@ def _merge(a, b): register( id=f"AntMaze_Open_Diverse_G{suffix}-{version}", - entry_point="gymnasium_robotics.envs.maze.ant_maze:AntMazeEnv", + entry_point=f"gymnasium_robotics.envs.maze.ant_maze_{version}:AntMazeEnv", kwargs=_merge( { "maze_map": maps.OPEN_DIVERSE_G, @@ -874,7 +874,7 @@ def _merge(a, b): register( id=f"AntMaze_Open_Diverse_GR{suffix}-{version}", - entry_point="gymnasium_robotics.envs.maze.ant_maze:AntMazeEnv", + entry_point=f"gymnasium_robotics.envs.maze.ant_maze_{version}:AntMazeEnv", kwargs=_merge( { "maze_map": maps.OPEN_DIVERSE_GR, @@ -886,7 +886,7 @@ def _merge(a, b): register( id=f"AntMaze_Medium{suffix}-{version}", - entry_point="gymnasium_robotics.envs.maze.ant_maze:AntMazeEnv", + entry_point=f"gymnasium_robotics.envs.maze.ant_maze_{version}:AntMazeEnv", kwargs=_merge( { "maze_map": maps.MEDIUM_MAZE, @@ -898,7 +898,7 @@ def _merge(a, b): register( id=f"AntMaze_Medium_Diverse_G{suffix}-{version}", - entry_point="gymnasium_robotics.envs.maze.ant_maze:AntMazeEnv", + entry_point=f"gymnasium_robotics.envs.maze.ant_maze_{version}:AntMazeEnv", kwargs=_merge( { "maze_map": maps.MEDIUM_MAZE_DIVERSE_G, @@ -910,7 +910,7 @@ def _merge(a, b): register( id=f"AntMaze_Medium_Diverse_GR{suffix}-{version}", - entry_point="gymnasium_robotics.envs.maze.ant_maze:AntMazeEnv", + entry_point=f"gymnasium_robotics.envs.maze.ant_maze_{version}:AntMazeEnv", kwargs=_merge( { "maze_map": maps.MEDIUM_MAZE_DIVERSE_GR, @@ -922,7 +922,7 @@ def _merge(a, b): register( id=f"AntMaze_Large{suffix}-{version}", - entry_point="gymnasium_robotics.envs.maze.ant_maze:AntMazeEnv", + entry_point=f"gymnasium_robotics.envs.maze.ant_maze_{version}:AntMazeEnv", kwargs=_merge( { "maze_map": maps.LARGE_MAZE, @@ -934,7 +934,7 @@ def _merge(a, b): register( id=f"AntMaze_Large_Diverse_G{suffix}-{version}", - entry_point="gymnasium_robotics.envs.maze.ant_maze:AntMazeEnv", + entry_point=f"gymnasium_robotics.envs.maze.ant_maze_{version}:AntMazeEnv", kwargs=_merge( { "maze_map": maps.LARGE_MAZE_DIVERSE_G, @@ -946,7 +946,7 @@ def _merge(a, b): register( id=f"AntMaze_Large_Diverse_GR{suffix}-{version}", - entry_point="gymnasium_robotics.envs.maze.ant_maze:AntMazeEnv", + entry_point=f"gymnasium_robotics.envs.maze.ant_maze_{version}:AntMazeEnv", kwargs=_merge( { "maze_map": maps.LARGE_MAZE_DIVERSE_GR, diff --git a/tests/utils.py b/tests/utils.py index 6eaeccd7..a86a9367 100644 --- a/tests/utils.py +++ b/tests/utils.py @@ -17,7 +17,7 @@ def assert_equals(a, b, prefix=None): b: second data structure prefix: prefix for failed assertion message for types and dicts """ - assert type(a) == type(b), f"{prefix}Differing types: {a} and {b}" + assert type(a) is type(b), f"{prefix}Differing types: {a} and {b}" if isinstance(a, dict): assert list(a.keys()) == list(b.keys()), f"{prefix}Key sets differ: {a} and {b}"