Skip to content

Commit

Permalink
Update to black style v24 (#1834)
Browse files Browse the repository at this point in the history
  • Loading branch information
araffin authored Feb 13, 2024
1 parent beee427 commit 1cba1bb
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 4 deletions.
3 changes: 2 additions & 1 deletion docs/misc/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Changelog
==========

Release 2.3.0a1 (WIP)
Release 2.3.0a2 (WIP)
--------------------------

Breaking Changes:
Expand Down Expand Up @@ -54,6 +54,7 @@ Deprecations:

Others:
^^^^^^^
- Updated black from v23 to v24

Documentation:
^^^^^^^^^^^^^^
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@
# Lint code and sort imports (flake8 and isort replacement)
"ruff>=0.0.288",
# Reformat
"black>=23.9.1,<24",
"black>=24.2.0,<25",
],
"docs": [
"sphinx>=5,<8",
Expand Down
1 change: 1 addition & 0 deletions stable_baselines3/common/save_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Save util taken from stable_baselines
used to serialize data (class parameters) of model classes
"""

import base64
import functools
import io
Expand Down
1 change: 1 addition & 0 deletions stable_baselines3/common/type_aliases.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Common aliases for type hints"""

from enum import Enum
from typing import TYPE_CHECKING, Any, Callable, Dict, List, NamedTuple, Optional, Protocol, SupportsFloat, Tuple, Union

Expand Down
1 change: 1 addition & 0 deletions stable_baselines3/common/vec_env/util.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Helpers for dealing with vectorized environments.
"""

from collections import OrderedDict
from typing import Any, Dict, List, Tuple

Expand Down
7 changes: 6 additions & 1 deletion stable_baselines3/common/vec_env/vec_frame_stack.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,12 @@ def __init__(self, venv: VecEnv, n_stack: int, channels_order: Optional[Union[st

def step_wait(
self,
) -> Tuple[Union[np.ndarray, Dict[str, np.ndarray]], np.ndarray, np.ndarray, List[Dict[str, Any]],]:
) -> Tuple[
Union[np.ndarray, Dict[str, np.ndarray]],
np.ndarray,
np.ndarray,
List[Dict[str, Any]],
]:
observations, rewards, dones, infos = self.venv.step_wait()
observations, infos = self.stacked_obs.update(observations, dones, infos) # type: ignore[arg-type]
return observations, rewards, dones, infos
Expand Down
2 changes: 1 addition & 1 deletion stable_baselines3/version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.3.0a1
2.3.0a2

0 comments on commit 1cba1bb

Please sign in to comment.