Fix `sb3_contrib/common/utils.py` type hint (#120)
* Update contribution.md * New loop struct to make mypy happy * Update setup.cfg * Update changelog * Add return statement in cg solver for max_iter=0 Co-authored-by: Antonin Raffin <antonin.raffin@ensta.org>
This commit is contained in:
parent
3d28d1e5de
commit
ded9f65bfd
|
|
@ -152,7 +152,7 @@ To run tests with `pytest`:
|
|||
make pytest
|
||||
```
|
||||
|
||||
Type checking with `pytype`:
|
||||
Type checking with `pytype` and `mypy`:
|
||||
|
||||
```
|
||||
make type
|
||||
|
|
@ -165,7 +165,7 @@ make check-codestyle
|
|||
make lint
|
||||
```
|
||||
|
||||
To run `pytype`, `format` and `lint` in one command:
|
||||
To run `type`, `format` and `lint` in one command:
|
||||
```
|
||||
make commit-checks
|
||||
```
|
||||
|
|
|
|||
|
|
@ -27,6 +27,7 @@ Deprecations:
|
|||
Others:
|
||||
^^^^^^^
|
||||
- Fixed flake8 config
|
||||
- Fixed ``sb3_contrib/common/utils.py`` type hint
|
||||
|
||||
Release 1.6.2 (2022-10-10)
|
||||
--------------------------
|
||||
|
|
|
|||
|
|
@ -133,6 +133,8 @@ def conjugate_gradient_solver(
|
|||
beta = new_residual_squared_norm / residual_squared_norm
|
||||
residual_squared_norm = new_residual_squared_norm
|
||||
p = residual + beta * p
|
||||
# Note: this return statement is only used when max_iter=0
|
||||
return x
|
||||
|
||||
|
||||
def flat_grad(
|
||||
|
|
|
|||
|
|
@ -32,7 +32,6 @@ exclude = (?x)(
|
|||
| sb3_contrib/common/recurrent/type_aliases.py$
|
||||
| sb3_contrib/common/recurrent/policies.py$
|
||||
| sb3_contrib/common/recurrent/buffers.py$
|
||||
| sb3_contrib/common/utils.py$
|
||||
| sb3_contrib/common/maskable/distributions.py$
|
||||
| sb3_contrib/common/maskable/callbacks.py$
|
||||
| sb3_contrib/common/maskable/policies.py$
|
||||
|
|
|
|||
Loading…
Reference in New Issue