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 ce3210f commit af4c3d2
Showing 1 changed file with 20 additions and 16 deletions.
36 changes: 20 additions & 16 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# .pre-commit-config.yaml file for https://github.com/zxdavb/ramses_cc
# last updated 2024-02-22, based on HA 2024.03.dev0
# last updated 2024-06-26

# exclude: (^.secrets/|^docs/|^misc)

Expand All @@ -13,18 +13,22 @@ repos:
- 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 # in tests
- 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 @@ -51,13 +62,6 @@ 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: private imports
# name: check for private imports
# entry: 'from .* import _.*'
Expand Down

0 comments on commit af4c3d2

Please sign in to comment.