Skip to content

Commit

Permalink
pre-commit
Browse files Browse the repository at this point in the history
  • Loading branch information
pseudo-rnd-thoughts committed Aug 9, 2024
1 parent 5120cb6 commit 6a09d2d
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 8 deletions.
7 changes: 5 additions & 2 deletions highway_env/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,8 @@ def _register_highway_envs():
)

gym.register(
id="parking-parked-v0", entry_point="highway_env.envs.parking_env:ParkingEnvParkedVehicles"
id="parking-parked-v0",
entry_point="highway_env.envs.parking_env:ParkingEnvParkedVehicles",
)

# racetrack_env.py
Expand All @@ -105,7 +106,9 @@ def _register_highway_envs():

# two_way_env.py
gym.register(
id="two-way-v0", entry_point="highway_env.envs.two_way_env:TwoWayEnv", max_episode_steps=15
id="two-way-v0",
entry_point="highway_env.envs.two_way_env:TwoWayEnv",
max_episode_steps=15,
)

# u_turn_env.py
Expand Down
12 changes: 10 additions & 2 deletions highway_env/envs/__init__.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,17 @@
from highway_env.envs.exit_env import ExitEnv
from highway_env.envs.highway_env import HighwayEnv, HighwayEnvFast
from highway_env.envs.intersection_env import IntersectionEnv, ContinuousIntersectionEnv, MultiAgentIntersectionEnv
from highway_env.envs.intersection_env import (
IntersectionEnv,
ContinuousIntersectionEnv,
MultiAgentIntersectionEnv,
)
from highway_env.envs.lane_keeping_env import LaneKeepingEnv
from highway_env.envs.merge_env import MergeEnv
from highway_env.envs.parking_env import ParkingEnv, ParkingEnvActionRepeat, ParkingEnvParkedVehicles
from highway_env.envs.parking_env import (
ParkingEnv,
ParkingEnvActionRepeat,
ParkingEnvParkedVehicles,
)
from highway_env.envs.racetrack_env import RacetrackEnv
from highway_env.envs.roundabout_env import RoundaboutEnv
from highway_env.envs.two_way_env import TwoWayEnv
Expand Down
1 change: 0 additions & 1 deletion highway_env/envs/common/abstract.py
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,6 @@ def __deepcopy__(self, memo):


class MultiAgentWrapper(Wrapper, RecordConstructorArgs):

def __init__(self, env):
Wrapper.__init__(self, env)
RecordConstructorArgs.__init__(self)
Expand Down
2 changes: 1 addition & 1 deletion highway_env/envs/exit_env.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
import numpy as np

from highway_env import utils
from highway_env.envs.highway_env import HighwayEnv
from highway_env.envs.common.action import Action
from highway_env.envs.highway_env import HighwayEnv
from highway_env.road.lane import CircularLane
from highway_env.road.road import Road, RoadNetwork
from highway_env.vehicle.controller import ControlledVehicle
Expand Down
5 changes: 3 additions & 2 deletions tests/envs/test_gym.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@


highway_env_ids = [
env_id for env_id, env_spec in gym.registry.items()
env_id
for env_id, env_spec in gym.registry.items()
if isinstance(env_spec.entry_point, str) and "highway_env" in env_spec.entry_point
]

Expand All @@ -24,7 +25,7 @@
"A Box observation space maximum value is infinity. This is probably too high.",
# "For Box action spaces, we recommend using a symmetric and normalized space (range=[-1, 1] or [0, 1]). See https://stable-baselines3.readthedocs.io/en/master/guide/rl_tips.html for more information.",
"The environment intersection-v0 is out of date. You should consider upgrading to version `v1`.",
"The environment intersection-multi-agent-v0 is out of date. You should consider upgrading to version `v1`."
"The environment intersection-multi-agent-v0 is out of date. You should consider upgrading to version `v1`.",
]
]

Expand Down

0 comments on commit 6a09d2d

Please sign in to comment.