[tool.ruff] # Same as Black. line-length = 127 # Assume Python 3.8 target-version = "py38" [tool.ruff.lint] select = ["E", "F", "B", "UP", "C90", "RUF"] # B028: Ignore explicit stacklevel` # RUF013: Too many false positives (implicit optional) ignore = ["B028", "RUF013"] [tool.ruff.lint.per-file-ignores] # ClassVar, implicit optional check not needed for tests "./tests/*.py"= ["RUF012", "RUF013"] [tool.ruff.lint.mccabe] # Unlike Flake8, ruff default to a complexity level of 10. max-complexity = 15 [tool.black] line-length = 127 [tool.mypy] ignore_missing_imports = true follow_imports = "silent" show_error_codes = true exclude = """(?x)( sb3_contrib/ppo_recurrent/ppo_recurrent.py$ | sb3_contrib/ars/ars.py$ | sb3_contrib/common/recurrent/policies.py$ | sb3_contrib/common/recurrent/buffers.py$ | tests/test_train_eval_mode.py$ )""" [tool.pytest.ini_options] # Deterministic ordering for tests; useful for pytest-xdist. env = [ "PYTHONHASHSEED=0" ] filterwarnings = [ # Tensorboard warnings "ignore::DeprecationWarning:tensorboard", ] markers = [ "slow: marks tests as slow (deselect with '-m \"not slow\"')" ] [tool.coverage.run] disable_warnings = ["couldnt-parse"] branch = false omit = ["tests/*", "setup.py"] [tool.coverage.report] exclude_lines = [ "pragma: no cover", "raise NotImplementedError()", "if typing.TYPE_CHECKING:"]