From 32bd1896e087a8ae00931edcafe1251ba193e73c Mon Sep 17 00:00:00 2001 From: Mike Gerber Date: Thu, 3 Aug 2023 19:02:11 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=9B=A0=20Replace=20flake8=20+=20pylint=20?= =?UTF-8?q?with=20ruff?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit As ruff is a lot faster than the other options, use this for code style checks etc. This change also removes setup.cfg (See also: gh-85). --- README-DEV.md | 2 +- pyproject.toml | 5 +++++ requirements-dev.txt | 3 ++- setup.cfg | 9 --------- 4 files changed, 8 insertions(+), 11 deletions(-) diff --git a/README-DEV.md b/README-DEV.md index d7b0a3f..a1d9b1a 100644 --- a/README-DEV.md +++ b/README-DEV.md @@ -32,6 +32,6 @@ pytest --cov=dinglehopper --cov-report=html Static code analysis: ```bash -pytest -k "not test" --flake8 pytest -k "not test" --mypy +pytest -k "not test" --ruff ``` diff --git a/pyproject.toml b/pyproject.toml index e2819f2..f0201ce 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -61,3 +61,8 @@ markers = [ [tool.mypy] ignore_missing_imports = true + + +[tool.ruff] +select = ["E", "F", "I"] +ignore = [] diff --git a/requirements-dev.txt b/requirements-dev.txt index 9403f15..030b803 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -1,5 +1,6 @@ pytest -pytest-flake8 pytest-cov pytest-mypy +pytest-ruff black +ruff diff --git a/setup.cfg b/setup.cfg index b74e617..e69de29 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,9 +0,0 @@ -[flake8] -max-line-length = 88 -extend-ignore = E203, W503 - -[pylint] -max-line-length = 88 - -[pylint.messages_control] -disable = C0330, C0326