Skip to content

Commit

Permalink
🔧 Fix Ruff configuration unintentionally enabling and re-disabling mc…
Browse files Browse the repository at this point in the history
…cabe complexity check (#10893)

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 <tiangolo@gmail.com>
  • Loading branch information
jiridanek and tiangolo committed Jan 12, 2024
1 parent 0ce4f80 commit 25646a5
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions pyproject.toml
Expand Up @@ -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]
Expand Down

0 comments on commit 25646a5

Please sign in to comment.