Skip to content

Commit

Permalink
tweak pre-commit
Browse files Browse the repository at this point in the history
  • Loading branch information
zxdavb committed Jun 26, 2024
1 parent b87ac4f commit 0b76569
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 17 deletions.
38 changes: 21 additions & 17 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,30 +1,34 @@
# .pre-commit-config.yaml file for https://github.com/zxdavb/ramses_rf
# last checked/updated: 2024/05/02 (c.f. HA 2023.5.x)
# last checked/updated: 2024-06-26

exclude: (^.secrets/|^docs/|^misc|tests/deprecated)

repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.4.2
rev: v0.4.10
hooks:
- id: ruff # linter
- id: ruff-format # formatter

- repo: https://github.com/pre-commit/pygrep-hooks
rev: v1.10.0
hooks:
- id: python-check-blanket-noqa
- id: python-check-blanket-type-ignore
- id: python-no-log-warn
- id: python-check-blanket-noqa
- id: python-check-blanket-type-ignore
# id: python-no-eval
- id: python-no-log-warn

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
# id: check-json # don't enable this one
- id: check-toml
- id: check-yaml
- id: end-of-file-fixer
- id: trailing-whitespace
- id: check-executables-have-shebangs
# id: check-json # don't enable this one
- id: check-toml
- id: check-yaml
- id: debug-statements
- id: end-of-file-fixer
- id: mixed-line-ending
- id: trailing-whitespace

- repo: local
hooks:
Expand All @@ -37,6 +41,13 @@ repos:
args: [-i]
exclude: (.pre-commit-config.yaml|^tests/.*\.py$) # avoid false +ve

- id: secrets
name: check for secrets
entry: '#.*(secret|password|pwd)'
language: pygrep
args: [-i]
exclude: .pre-commit-config.yaml # avoid false +ve

- id: style_1
name: check for 'as exc:' (should be 'as err:')
entry: ' as exc:'
Expand All @@ -58,13 +69,6 @@ repos:
# args: [-i]
# exclude: .pre-commit-config.yaml # avoid false +ve

- id: secrets
name: check for secrets
entry: '#.*(secret|password|pwd)'
language: pygrep
args: [-i]
exclude: .pre-commit-config.yaml # avoid false +ve


# We do not use pre-commit/mirrors-mypy, as it comes with opinionated defaults
# (like --ignore-missing-imports) and is difficult to configure to run
Expand Down
1 change: 1 addition & 0 deletions tests/tests/fingerprints/_gather.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#!/usr/bin/bash

pwd

Expand Down

0 comments on commit 0b76569

Please sign in to comment.