Skip to content

Commit

Permalink
adopt repo-review pre-commit hook (#456)
Browse files Browse the repository at this point in the history
  • Loading branch information
bjlittle authored Apr 25, 2024
1 parent fea1607 commit c0b68b7
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,13 @@ repos:
hooks:
- id: validate-pyproject

- repo: https://github.com/scientific-python/cookie
rev: 2024.03.10
hooks:
- id: sp-repo-review
additional_dependencies: ["repo-review[cli]"]
args: ["--show=errskip"]

# TODO: pending the addition of numpydoc, including config file(s).
#- repo: https://github.com/numpy/numpydoc
# rev: v1.7.0
Expand Down
13 changes: 13 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ ignore = [
# See https://mypy.readthedocs.io/en/stable/config_file.html
ignore_missing_imports = true
warn_unused_configs = true
warn_unreachable = true
enable_error_code = ["ignore-without-code", "redundant-expr", "truthy-bool"]
exclude = [
'noxfile\.py',
Expand All @@ -133,6 +134,18 @@ minversion = "6.0"
testpaths = "src/iris_grib"
xfail_strict = "True"

[tool.repo-review]
ignore = [
# https://learn.scientific-python.org/development/guides/style/#MY102
"MY102", # MyPy show_error_codes deprecated
# https://learn.scientific-python.org/development/guides/style/#PC170
"PC170", # Uses PyGrep hooks
# https://learn.scientific-python.org/development/guides/style/#PC180
"PC180", # Uses prettier
# https://learn.scientific-python.org/development/guides/pytest/#PP309
"PP309", # Filter warnings specified
]

[tool.ruff]
# Exclude the following, in addition to the standard set of exclusions.
# https://docs.astral.sh/ruff/settings/#exclude
Expand Down

0 comments on commit c0b68b7

Please sign in to comment.