From 25646a5070064053309259f1e69c98015c5ec633 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jiri=20Dan=C4=9Bk?= Date: Fri, 12 Jan 2024 16:01:06 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A7=20Fix=20Ruff=20configuration=20uni?= =?UTF-8?q?ntentionally=20enabling=20and=20re-disabling=20mccabe=20complex?= =?UTF-8?q?ity=20check=20(#10893)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fix mistake in Ruff configuration unintentionally enabling mccabe complexity check Enabling "C" turns on complexity checks (C90, mccabe), which is unintended Instead, enable "C4" to get flake8-comprehensions checks See docs at https://docs.astral.sh/ruff/rules/#flake8-comprehensions-c4 Co-authored-by: Sebastián Ramírez --- pyproject.toml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 8e7f8bbbe5914..3e43f35e17cac 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -145,15 +145,14 @@ select = [ "W", # pycodestyle warnings "F", # pyflakes "I", # isort - "C", # flake8-comprehensions "B", # flake8-bugbear + "C4", # flake8-comprehensions "UP", # pyupgrade ] ignore = [ "E501", # line too long, handled by black "B008", # do not perform function calls in argument defaults - "C901", # too complex - "W191", # indentation contains tabs + "W191", # indentation contains tabs ] [tool.ruff.per-file-ignores]