Update to black style v24 (#1834)

This commit is contained in:
Antonin RAFFIN 2024-02-13 11:36:05 +01:00 committed by GitHub
parent beee4279eb
commit 1cba1bbd2f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 13 additions and 4 deletions

View file

@ -3,7 +3,7 @@
Changelog
==========
Release 2.3.0a1 (WIP)
Release 2.3.0a2 (WIP)
--------------------------
Breaking Changes:
@ -54,6 +54,7 @@ Deprecations:
Others:
^^^^^^^
- Updated black from v23 to v24
Documentation:
^^^^^^^^^^^^^^

View file

@ -122,7 +122,7 @@ setup(
# 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",

View file

@ -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

View file

@ -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

View file

@ -1,6 +1,7 @@
"""
Helpers for dealing with vectorized environments.
"""
from collections import OrderedDict
from typing import Any, Dict, List, Tuple

View file

@ -29,7 +29,12 @@ class VecFrameStack(VecEnvWrapper):
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

View file

@ -1 +1 @@
2.3.0a1
2.3.0a2