mirror of
https://github.com/saymrwulf/stable-baselines3.git
synced 2026-11-17 08:56:08 +00:00
Update to black style v24 (#1834)
This commit is contained in:
parent
beee4279eb
commit
1cba1bbd2f
7 changed files with 13 additions and 4 deletions
|
|
@ -3,7 +3,7 @@
|
||||||
Changelog
|
Changelog
|
||||||
==========
|
==========
|
||||||
|
|
||||||
Release 2.3.0a1 (WIP)
|
Release 2.3.0a2 (WIP)
|
||||||
--------------------------
|
--------------------------
|
||||||
|
|
||||||
Breaking Changes:
|
Breaking Changes:
|
||||||
|
|
@ -54,6 +54,7 @@ Deprecations:
|
||||||
|
|
||||||
Others:
|
Others:
|
||||||
^^^^^^^
|
^^^^^^^
|
||||||
|
- Updated black from v23 to v24
|
||||||
|
|
||||||
Documentation:
|
Documentation:
|
||||||
^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^
|
||||||
|
|
|
||||||
2
setup.py
2
setup.py
|
|
@ -122,7 +122,7 @@ setup(
|
||||||
# Lint code and sort imports (flake8 and isort replacement)
|
# Lint code and sort imports (flake8 and isort replacement)
|
||||||
"ruff>=0.0.288",
|
"ruff>=0.0.288",
|
||||||
# Reformat
|
# Reformat
|
||||||
"black>=23.9.1,<24",
|
"black>=24.2.0,<25",
|
||||||
],
|
],
|
||||||
"docs": [
|
"docs": [
|
||||||
"sphinx>=5,<8",
|
"sphinx>=5,<8",
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@
|
||||||
Save util taken from stable_baselines
|
Save util taken from stable_baselines
|
||||||
used to serialize data (class parameters) of model classes
|
used to serialize data (class parameters) of model classes
|
||||||
"""
|
"""
|
||||||
|
|
||||||
import base64
|
import base64
|
||||||
import functools
|
import functools
|
||||||
import io
|
import io
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
"""Common aliases for type hints"""
|
"""Common aliases for type hints"""
|
||||||
|
|
||||||
from enum import Enum
|
from enum import Enum
|
||||||
from typing import TYPE_CHECKING, Any, Callable, Dict, List, NamedTuple, Optional, Protocol, SupportsFloat, Tuple, Union
|
from typing import TYPE_CHECKING, Any, Callable, Dict, List, NamedTuple, Optional, Protocol, SupportsFloat, Tuple, Union
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
"""
|
"""
|
||||||
Helpers for dealing with vectorized environments.
|
Helpers for dealing with vectorized environments.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from collections import OrderedDict
|
from collections import OrderedDict
|
||||||
from typing import Any, Dict, List, Tuple
|
from typing import Any, Dict, List, Tuple
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,12 @@ class VecFrameStack(VecEnvWrapper):
|
||||||
|
|
||||||
def step_wait(
|
def step_wait(
|
||||||
self,
|
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, rewards, dones, infos = self.venv.step_wait()
|
||||||
observations, infos = self.stacked_obs.update(observations, dones, infos) # type: ignore[arg-type]
|
observations, infos = self.stacked_obs.update(observations, dones, infos) # type: ignore[arg-type]
|
||||||
return observations, rewards, dones, infos
|
return observations, rewards, dones, infos
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
2.3.0a1
|
2.3.0a2
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue