File: constants.py

package info (click to toggle)
pre-commit 3.0.4-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 1,420 kB
  • sloc: python: 12,520; sh: 109; cs: 44; makefile: 2
file content (26 lines) | stat: -rw-r--r-- 687 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
from __future__ import annotations

import importlib.metadata

CONFIG_FILE = '.pre-commit-config.yaml'
MANIFEST_FILE = '.pre-commit-hooks.yaml'

# Bump when modifying `empty_template`
LOCAL_REPO_VERSION = '1'

VERSION = importlib.metadata.version('pre_commit')

# `manual` is not invoked by any installed git hook.  See #719
STAGES = (
    'commit', 'merge-commit', 'prepare-commit-msg', 'commit-msg',
    'post-commit', 'manual', 'post-checkout', 'push', 'post-merge',
    'post-rewrite',
)

HOOK_TYPES = (
    'pre-commit', 'pre-merge-commit', 'pre-push', 'prepare-commit-msg',
    'commit-msg', 'post-commit', 'post-checkout', 'post-merge',
    'post-rewrite',
)

DEFAULT = 'default'