mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 16:24:40 +04:00
The previous hard-coded version (v3.2.0) used stage names which are deprecated in the current version of `pre-commit`, and so emits a warning when used: ``` [WARNING] repo `https://github.com/pre-commit/pre-commit-hooks` uses deprecated stage names (commit, push) which will be removed in a future version. Hint: often `pre-commit autoupdate --repo https://github.com/pre-commit/pre-commit-hooks` will fix this. if it does not -- consider reporting an issue to that repo. ``` Bumping to `v6.0.0` will help avoid this warning being emitted and encourage the user to use a more up-to-date version if they use this sample config.
18 lines
453 B
Python
18 lines
453 B
Python
from __future__ import annotations
|
|
SAMPLE_CONFIG = '''\
|
|
# See https://pre-commit.com for more information
|
|
# See https://pre-commit.com/hooks.html for more hooks
|
|
repos:
|
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
rev: v6.0.0
|
|
hooks:
|
|
- id: trailing-whitespace
|
|
- id: end-of-file-fixer
|
|
- id: check-yaml
|
|
- id: check-added-large-files
|
|
'''
|
|
|
|
|
|
def sample_config() -> int:
|
|
print(SAMPLE_CONFIG, end='')
|
|
return 0
|