Skip to content

Commit 20409bc

Browse files
committed
final spacing and other lint issues
1 parent bd7e27a commit 20409bc

File tree

2 files changed

+4
-7
lines changed

2 files changed

+4
-7
lines changed

stable_baselines3/common/env_checker.py

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import gymnasium as gym
55
import numpy as np
66
from gymnasium import spaces
7-
from gymnasium.spaces.graph import GraphInstance
7+
from gymnasium.spaces.graph import GraphInstance
88

99
from stable_baselines3.common.preprocessing import check_for_nested_spaces, is_image_space_channels_first
1010
from stable_baselines3.common.vec_env import DummyVecEnv, VecCheckNan
@@ -214,9 +214,7 @@ def _check_obs(obs: Union[tuple, dict, np.ndarray, int], observation_space: spac
214214
else:
215215
assert not (
216216
isinstance(obs, tuple) and _is_graph_space(observation_space)
217-
), (
218-
f"TypeError: `{method_name}()` should be a single value of (1, GraphInstance), not of tuple length {len(obs)}"
219-
)
217+
), f"TypeError: `{method_name}()` should be a single value of (1, GraphInstance), not of tuple length {len(obs)}"
220218
assert not isinstance(
221219
obs, tuple
222220
), f"The observation returned by the `{method_name}()` method should be a single value, not a tuple"
@@ -232,9 +230,7 @@ def _check_obs(obs: Union[tuple, dict, np.ndarray, int], observation_space: spac
232230
# check fields here (nodes, edges, edge_links)
233231
assert observation_space.contains(
234232
obs
235-
), (
236-
f"The observation returned by the `{method_name}()` method is incompatible w/ graph-obs: {observation_space}"
237-
)
233+
), f"The observation returned by the `{method_name}()` method is incompatible w/ graph-obs: {observation_space}"
238234
return
239235

240236
elif _is_numpy_array_space(observation_space):

tests/test_env_checker.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import numpy as np
55
import pytest
66
from gymnasium import spaces
7+
78
from stable_baselines3.common.env_checker import check_env
89

910

0 commit comments

Comments
 (0)