Skip to content

Commit

Permalink
Merge branch 'main' of github.com:bjlittle/geovista into ruff-compliance
Browse files Browse the repository at this point in the history
  • Loading branch information
bjlittle committed Nov 18, 2024
2 parents 79b16fd + a26ca43 commit a021cd2
Show file tree
Hide file tree
Showing 4 changed files with 178 additions and 196 deletions.
7 changes: 7 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -109,3 +109,10 @@ repos:
- id: sp-repo-review
additional_dependencies: ["repo-review[cli]"]
args: ["--show=errskip"]

- repo: https://github.com/ComPWA/taplo-pre-commit
rev: v0.9.3
hooks:
- id: taplo-format
# See options: https://taplo.tamasfe.dev/configuration/formatter-options.html
args: [--option, "reorder_arrays=true", --option, "reorder_keys=true"]
52 changes: 26 additions & 26 deletions .ruff.toml
Original file line number Diff line number Diff line change
@@ -1,42 +1,42 @@
extend = "pyproject.toml"

lint.ignore = [
# NOTE: To find a rule code to fix, run:
# ruff --select="ALL" --statistics src/geovista/<subpackage>
# 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.
# 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)
# https://docs.astral.sh/ruff/rules/#flake8-self-slf
"SLF001", # Private member accessed.
# flake8-self (SLF)
# https://docs.astral.sh/ruff/rules/#flake8-self-slf
"SLF001", # Private member accessed.
]

[lint.extend-per-file-ignores]
"conftest.py" = [
# flake8-annotations (ANN)
# https://docs.astral.sh/ruff/rules/#flake8-annotations-ann
"ANN001", # Missing type annotation for function argument.
"ANN201", # Missing return type annotation for public function.
# flake8-annotations (ANN)
# https://docs.astral.sh/ruff/rules/#flake8-annotations-ann
"ANN001", # Missing type annotation for function argument.
"ANN201", # Missing return type annotation for public function.
]
"src/geovista/geoplotter.py" = [
# flake8-annotations (ANN)
# https://docs.astral.sh/ruff/rules/#flake8-annotations-ann
"ANN401", # Dynamically typed expressions (typing.Any).
# flake8-annotations (ANN)
# https://docs.astral.sh/ruff/rules/#flake8-annotations-ann
"ANN401", # Dynamically typed expressions (typing.Any).
]
"test_*.py" = [
# flake8-annotations (ANN)
# https://docs.astral.sh/ruff/rules/#flake8-annotations-ann
"ANN001", # Missing type annotation for function argument.
"ANN201", # Missing return type annotation for public funciton.
# flake8-annotations (ANN)
# https://docs.astral.sh/ruff/rules/#flake8-annotations-ann
"ANN001", # Missing type annotation for function argument.
"ANN201", # Missing return type annotation for public funciton.
]
"test_slice_lines.py" = [
# eradicate (ERA)
# https://docs.astral.sh/ruff/rules/#eradicate-era
"ERA001", # Found commented-out code.
# eradicate (ERA)
# https://docs.astral.sh/ruff/rules/#eradicate-era
"ERA001", # Found commented-out code.
]
1 change: 1 addition & 0 deletions changelog/1207.contributor.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add `taplo <https://github.com/tamasfe/taplo>`__ pre-commit hook to format and sort toml files. (:user:`tkoyama010`)
Loading

0 comments on commit a021cd2

Please sign in to comment.