From 9feaaf2f3977acfd7d8837015f58bf0ca51e9afd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= Date: Mon, 15 Jan 2024 09:36:45 +0100 Subject: [PATCH] Migrate "qa" to ruff MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Michał Górny --- pyproject.toml | 39 +++++++++++++++++++++++++++++++++++++++ tox.ini | 6 ++---- 2 files changed, 41 insertions(+), 4 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 10ecd03..4865e68 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -61,3 +61,42 @@ include = [ [tool.pytest.ini_options] addopts = "--doctest-modules" testpaths = ["gpyutils"] + +[tool.ruff] +line-length = 80 + +[tool.ruff.lint] +extend-select = [ + "E", + "N", + "W", +# "I", +# "UP", +# "ANN", +# "B", + "A", + "COM", + "CPY", +# "C4", + "EXE", + "ISC", + "PIE", + "PT", +# "Q", + "RSE", +# "RET", +# "SLOT", +# "SIM", + "TCH", +# "ARG", +# "ERA", + "PGH", +# "PL", +# "PERF", +# "FURB", +# "RUF", +] + +[tool.ruff.lint.flake8-copyright] +min-file-size = 1 +notice-rgx = "\\(c\\) \\d{4}(-\\d{4})?" diff --git a/tox.ini b/tox.ini index 55b6ac2..a293a45 100644 --- a/tox.ini +++ b/tox.ini @@ -16,11 +16,9 @@ commands = [testenv:qa] skipinstall = True deps = - pycodestyle - pyflakes + ruff commands = - pycodestyle {posargs:add-remotes gpyutils timeline} - pyflakes {posargs:add-remotes gpyutils timeline} + ruff check --preview [testenv:upload] skipinstall = True