forked from xapi-project/xen-api
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.pre-commit-config.yaml
56 lines (55 loc) · 2.02 KB
/
.pre-commit-config.yaml
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#
# Configuration of pre-commit, a Python framework for git hooks.
# pre-commit is run for each git push by GitHub CI. It can run
# locally as well for early feedback and automatic formatting
# like trailing whitespace removal (to be configured later):
#
## For only installing the package itself, run:
# pip3 install pre-commit
#
## For activating it as a pre-commit and pre-push hook (recommended):
# pre-commit install --hook-type pre-push --hook-type pre-commit
#
## For manually executing the pre-push hook:
# pre-commit run -av --hook-stage pre-push
#
default_stages: [commit, push]
repos:
# Recommendation for a minimal git pre-commit hook:
# https://github.com/pre-commit/pre-commit-hooks/blob/main/README.md:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: no-commit-to-branch
name: "The master branch should be pulled only, don't commit to it"
args: [--branch, master]
always_run: true
- id: check-merge-conflict
- id: check-yaml
- id: check-executables-have-shebangs
exclude: ocaml
# Recommendation for a minimal git pre-push hook:
# While using pre-commit yields great results, it
# is "not fast". Therefore only run it pre-push,
# (but always in GitHub CI of course):
#
# Calls ./pytype_reporter.py in a dedicated venv:
# pre-commit run -av --hook-stage push
- repo: local
hooks:
- id: pytype
name: pytype
entry: python3 pytype_reporter.py
pass_filenames: false
types: [python]
stages: [push]
verbose: true
# This hook runs locally only when Python files change:
language: python
# Pytype supports running on Python 3.8 to Python3.11 currently:
# https://google.github.io/pytype/support.html
# If a dev's default python3 interpreter is outside that range, but
# developers have such version installed, it can be configured here:
# language_version: python3.11
require_serial: true
additional_dependencies: [pandas, pytype]