[tool.ruff] # Same as Black. line-length = 127 # Assume Python 3.7 target-version = "py37" select = ["E", "F", "B", "UP", "C90", "RUF"] # Ignore explicit stacklevel` ignore = ["B028"] [tool.ruff.mccabe] # Unlike Flake8, ruff default to a complexity level of 10. max-complexity = 15 [tool.black] line-length = 127 [tool.isort] profile = "black" line_length = 127 src_paths = ["sb3_contrib"] [tool.pytype] inputs = ['sb3_contrib'] [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/qrdqn/qrdqn.py$ | sb3_contrib/qrdqn/policies.py$ | sb3_contrib/common/recurrent/policies.py$ | sb3_contrib/common/recurrent/buffers.py$ | sb3_contrib/common/maskable/distributions.py$ | sb3_contrib/common/maskable/callbacks.py$ | sb3_contrib/common/maskable/policies.py$ | sb3_contrib/common/maskable/buffers.py$ | sb3_contrib/common/envs/invalid_actions_env.py$ | sb3_contrib/common/vec_env/async_eval.py$ | sb3_contrib/tqc/tqc.py$ | sb3_contrib/tqc/policies.py$ | sb3_contrib/trpo/trpo.py$ | sb3_contrib/ppo_mask/ppo_mask.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", # Gym warnings "ignore:Parameters to load are deprecated.:DeprecationWarning", "ignore:the imp module is deprecated in favour of importlib:PendingDeprecationWarning", "ignore::UserWarning:gym", ] 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:"]