Skip to content

Commit

Permalink
make complexity checks more lenient
Browse files Browse the repository at this point in the history
  • Loading branch information
stephenworsley committed Nov 20, 2024
1 parent c88a848 commit 27250ef
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -178,10 +178,6 @@ ignore = [
"ANN204",

"B904", # Try except handling

# McCabe complexity https://docs.astral.sh/ruff/rules/complex-structure/
"C901",

"D104", # Misssing docstring
"E501", # Line too long
"ERA001", # Commented out code
Expand All @@ -198,11 +194,6 @@ ignore = [
"N802",
"N806",

# Too many branches, arguments, statements
"PLR0912",
"PLR0913",
"PLR0915",

"PLR2004", # Magic value used in comparison
"RET504", # Unnecessary assignment before `return`
"S101", # Use of `assert`
Expand All @@ -228,6 +219,10 @@ ignore = [
force-sort-within-sections = true
known-first-party = ["iris-esmf-regrid"]

[tool.ruff.lint.mccabe]
# TODO: refactor to reduce complexity, if possible
max-complexity = 19

[tool.ruff.lint.per-file-ignores]
# All test scripts

Expand Down Expand Up @@ -300,3 +295,9 @@ known-first-party = ["iris-esmf-regrid"]

[tool.ruff.lint.pydocstyle]
convention = "numpy"

[tool.ruff.lint.pylint]
# TODO: refactor to reduce complexity, if possible
max-args = 10
max-branches = 17
max-statements = 101

0 comments on commit 27250ef

Please sign in to comment.