From 92466acf74ad958f041cfe9b3d9f49241e74e5d4 Mon Sep 17 00:00:00 2001 From: Eric Arellano <14852634+Eric-Arellano@users.noreply.github.com> Date: Thu, 24 Oct 2024 03:20:16 -0400 Subject: [PATCH] Replace pydocstyle with Ruff (#20) * Replace pydocstyle with Ruff * Single call * More precise ignore * Revert "More precise ignore" This reverts commit 71aeb87862c2d598f8e1e7c35636716c465c5abf. (cherry picked from commit d70fb5753ee173ccb87215cc65f171c8b7c931e9) --- pyproject.toml | 9 ++++++++- tox.ini | 1 - 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 0651099..18e0690 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -59,7 +59,6 @@ style = [ ] lint = [ "qiskit-addon-mpf[style]", - "pydocstyle==6.3.0", "mypy==1.11.2", "pylint==3.2.7", "reno>=4.1", @@ -138,6 +137,7 @@ select = [ "I", # isort "E", # pycodestyle "W", # pycodestyle + "D", # pydocstyle "F", # pyflakes "RUF", # ruff "UP", # pyupgrade @@ -153,8 +153,12 @@ ignore = [ max-args = 6 [tool.ruff.lint.extend-per-file-ignores] +"test/**.py" = [ + "D", # pydocstyle +] "docs/**/*" = [ "E402", # module level import not at top of file + "D", # pydocstyle ] [tool.ruff.lint.flake8-copyright] @@ -172,4 +176,7 @@ notice-rgx = """ # that they have been altered from the originals\\. """ +[tool.ruff.lint.pydocstyle] +convention = "google" + [tool.typos.default.extend-words] diff --git a/tox.ini b/tox.ini index 84f1f8f..334106f 100644 --- a/tox.ini +++ b/tox.ini @@ -29,7 +29,6 @@ commands = ruff check qiskit_addon_mpf/ docs/ test/ ruff check --preview --select CPY001 --exclude "*.ipynb" qiskit_addon_mpf/ test/ nbqa ruff docs/ - pydocstyle qiskit_addon_mpf/ mypy qiskit_addon_mpf/ pylint -rn qiskit_addon_mpf/ test/ nbqa pylint -rn docs/