From 26e210a6ae9093c9b30ede2b6e87310faa229f80 Mon Sep 17 00:00:00 2001 From: Dominik Jain Date: Thu, 15 Feb 2024 11:38:23 +0100 Subject: [PATCH] Apply nbqa only to the docs/ folder and exclude the (old) jupyter_execute folder --- pyproject.toml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index aa66eb5..c47b14b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -143,8 +143,8 @@ line-length = 100 target-version = ["py311"] [tool.nbqa.exclude] -ruff = ".jupyter_cache" -mypy = ".jupyter_cache" +ruff = "\\.jupyter_cache|jupyter_execute" +mypy = "\\.jupyter_cache|jupyter_execute" [tool.ruff] select = [ @@ -203,10 +203,10 @@ test = "pytest test --cov=tianshou --cov-report=xml --cov-report=term-missing -- test-reduced = "pytest test/base test/continuous --cov=tianshou --durations=0 -v --color=yes" _black_check = "black --check ." _ruff_check = "ruff check ." -_ruff_check_nb = "nbqa ruff ." +_ruff_check_nb = "nbqa ruff docs" _black_format = "black ." _ruff_format = "ruff --fix ." -_ruff_format_nb = "nbqa ruff --fix ." +_ruff_format_nb = "nbqa ruff --fix docs" lint = ["_black_check", "_ruff_check", "_ruff_check_nb"] _poetry_install_sort_plugin = "poetry self add poetry-plugin-sort" _poetry_sort = "poetry sort" @@ -221,5 +221,5 @@ doc-generate-files = ["_autogen_rst", "_jb_generate_toc", "_jb_generate_config"] doc-spellcheck = "sphinx-build -W -b spelling docs docs/_build" doc-build = ["doc-generate-files", "doc-spellcheck", "_sphinx_build"] _mypy = "mypy tianshou" -_mypy_nb = "nbqa mypy ." +_mypy_nb = "nbqa mypy docs" type-check = ["_mypy", "_mypy_nb"]