Update ruff and SB3 dependencies (#232)

This commit is contained in:
Antonin RAFFIN 2024-03-11 14:29:47 +01:00 committed by Andreas Schaarschmidt
parent 7dd6c39fba
commit 89d0113037
5 changed files with 13 additions and 11 deletions

View File

@ -12,23 +12,23 @@ type: mypy
lint: lint:
# stop the build if there are Python syntax errors or undefined names # stop the build if there are Python syntax errors or undefined names
# see https://www.flake8rules.com/ # see https://www.flake8rules.com/
ruff ${LINT_PATHS} --select=E9,F63,F7,F82 --show-source ruff check ${LINT_PATHS} --select=E9,F63,F7,F82 --output-format=full
# exit-zero treats all errors as warnings. # exit-zero treats all errors as warnings.
ruff ${LINT_PATHS} --exit-zero ruff check ${LINT_PATHS} --exit-zero
format: format:
# Sort imports # Sort imports
ruff --select I ${LINT_PATHS} --fix ruff check --select I ${LINT_PATHS} --fix
# Reformat using black # Reformat using black
black ${LINT_PATHS} black ${LINT_PATHS}
check-codestyle: check-codestyle:
# Sort imports # Sort imports
ruff --select I ${LINT_PATHS} ruff check --select I ${LINT_PATHS}
# Reformat using black # Reformat using black
black --check ${LINT_PATHS} black --check ${LINT_PATHS}
commit-checks: format type lint commit-checks: format type lint
doc: doc:

View File

@ -3,13 +3,13 @@
Changelog Changelog
========== ==========
Release 2.3.0a1 (WIP) Release 2.3.0a4 (WIP)
-------------------------- --------------------------
Breaking Changes: Breaking Changes:
^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^
- Upgraded to Stable-Baselines3 >= 2.3.0 - Upgraded to Stable-Baselines3 >= 2.3.0
- The default ``leanrning_starts`` parameter of ``QRDQN`` have been changed to be consistent with the other offpolicy algorithms - The default ``learning_starts`` parameter of ``QRDQN`` have been changed to be consistent with the other offpolicy algorithms
.. code-block:: python .. code-block:: python

View File

@ -3,16 +3,18 @@
line-length = 127 line-length = 127
# Assume Python 3.8 # Assume Python 3.8
target-version = "py38" target-version = "py38"
[tool.ruff.lint]
select = ["E", "F", "B", "UP", "C90", "RUF"] select = ["E", "F", "B", "UP", "C90", "RUF"]
# B028: Ignore explicit stacklevel` # B028: Ignore explicit stacklevel`
# RUF013: Too many false positives (implicit optional) # RUF013: Too many false positives (implicit optional)
ignore = ["B028", "RUF013"] ignore = ["B028", "RUF013"]
[tool.ruff.per-file-ignores] [tool.ruff.lint.per-file-ignores]
# ClassVar, implicit optional check not needed for tests # ClassVar, implicit optional check not needed for tests
"./tests/*.py"= ["RUF012", "RUF013"] "./tests/*.py"= ["RUF012", "RUF013"]
[tool.ruff.mccabe] [tool.ruff.lint.mccabe]
# Unlike Flake8, ruff default to a complexity level of 10. # Unlike Flake8, ruff default to a complexity level of 10.
max-complexity = 15 max-complexity = 15

View File

@ -1 +1 @@
2.3.0a1 2.3.0a4

View File

@ -65,7 +65,7 @@ setup(
packages=[package for package in find_packages() if package.startswith("sb3_contrib")], packages=[package for package in find_packages() if package.startswith("sb3_contrib")],
package_data={"sb3_contrib": ["py.typed", "version.txt"]}, package_data={"sb3_contrib": ["py.typed", "version.txt"]},
install_requires=[ install_requires=[
"stable_baselines3>=2.3.0a0,<3.0", "stable_baselines3>=2.3.0a4,<3.0",
], ],
description="Contrib package of Stable Baselines3, experimental code.", description="Contrib package of Stable Baselines3, experimental code.",
author="Antonin Raffin", author="Antonin Raffin",