Skip to content

Commit

Permalink
ruff: PLR compliance
Browse files Browse the repository at this point in the history
  • Loading branch information
bjlittle committed Nov 20, 2024
1 parent a49ae32 commit d97f322
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
7 changes: 0 additions & 7 deletions .ruff.toml
Original file line number Diff line number Diff line change
@@ -1,15 +1,8 @@
extend = "pyproject.toml"

lint.ignore = [
# NOTE: To find a rule code to fix, run:
# ruff --select="ALL" --statistics src/geovista/<subpackage>

# Pylint (PL)
# https://docs.astral.sh/ruff/rules/#pylint-pl
"PLR0912", # Too many branches.
"PLR0913", # Too many arguments in function definition.
"PLR0915", # Too many statements.
"PLR2004", # Magic value used in comparison, consider replacing with a constant.
"PLW0603", # Using the global statement to update is discouraged.

# flake8-self (SLF)
Expand Down
12 changes: 12 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,10 @@ ignore = [
# https://docs.astral.sh/ruff/rules/#pandas-vet-pd
"PD",

# Pylint (PL)
# https://docs.astral.sh/ruff/rules/#pylint-pl
"PLR2004", # Magic value used in comparison, consider replacing with a constant.

# flake8-bandit (S)
# https://docs.astral.sh/ruff/rules/assert/
"S101", # Use of assert detected.
Expand All @@ -212,9 +216,17 @@ required-imports = ["from __future__ import annotations"]


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


[tool.ruff.lint.pylint]
# TODO @bjlittle: refactor to reduce the complexity, if possible
max-args = 14
max-branches = 29
max-statements = 91


[tool.ruff.lint.per-file-ignores]
".github/scripts/*.py" = [
# https://docs.astral.sh/ruff/rules/#flake8-boolean-trap-fbt
Expand Down

0 comments on commit d97f322

Please sign in to comment.