@@ -21,9 +21,13 @@ repos:
2121 stages : [pre-commit]
2222 language : system
2323 entry : jupyter nbconvert --clear-output
24- # Prevents committing directly branches named 'main' and 'master'.
24+ # Run a series of standard precommit checks, including:
25+ # - no commits to branches named 'main' and 'master'.
26+ # - No large files (>= 500kb)
27+ # - All YAML and TOML files are valid.
28+ # - No outstanding merge conflict markers in the codebase.
2529 - repo : https://github.com/pre-commit/pre-commit-hooks
26- rev : 3e8a8703264a2f4a69428a0aa4dcb512790b2c8c
30+ rev : 3e8a8703264a2f4a69428a0aa4dcb512790b2c8c # v6.0.0
2731 hooks :
2832 - id : no-commit-to-branch
2933 name : Prevent main branch commits
@@ -32,6 +36,13 @@ repos:
3236 name : Check for large files
3337 description : Prevent the user from committing very large files.
3438 args : ['--maxkb=500']
39+ - id : check-toml
40+ name : Validate TOML files
41+ - id : check-yaml
42+ args : [--allow-multiple-documents] # Allow multiple document format
43+ name : Validate YAML files
44+ - id : check-merge-conflict
45+ name : Check for files that contain merge conflict strings
3546 # Verify that pyproject.toml is well formed
3647 - repo : https://github.com/abravalheri/validate-pyproject
3748 rev : 17e12779811926f000bdfa1795f9e3735dd71ac3
7990 # supported by your project here, or alternatively use
8091 # pre-commit's default_language_version, see
8192 # https://pre-commit.com/#top_level-default_language_version
82- language_version : python3.11
93+ # This currently uses the default language version. Uncomment
94+ # the following line to use the max version.
95+ # language_version: python{{ py.max(python_versions) }}
8396 # Run unit tests, verify that they pass. Note that coverage is run against
8497 # the ./src directory here because that is what will be committed. In the
8598 # github workflow script, the coverage is run against the installed package
0 commit comments