-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
45 lines (38 loc) · 1.48 KB
/
.pre-commit-config.yaml
File metadata and controls
45 lines (38 loc) · 1.48 KB
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
repos:
- repo: local # set up all as local to manage packages with pip in Docker
hooks:
# NB to ignore git hook when for a specific commit/push:
# git commit ... --no-verify
# git push ... --no-verify
# If quantify-core is installed in a virtual environment, then
# the git commit/push must be executed in the same environment
# (applies to IDEs as well!)
# ################################################################################
# Static analysis before committing
# ################################################################################
# To install the hooks run:
# pre-commit install --hook-type pre-commit
# To uninstall the hooks run:
# pre-commit uninstall --hook-type pre-commit
# To execute the hooks manually run:
# pre-commit run --all-files --hook-stage commit
# pip install black
- id: black
name: Python code autoformatter [black]
language_version: python3
entry: black
args: ["--fast"]
stages: [pre-commit]
language: python
types: [python]
# pip install ruff
- id: ruff
name: Linter [ruff]
description: "Run 'ruff check' for extremely fast Python linting"
entry: ruff check --force-exclude
language: python
'types_or': [python, pyi]
args: []
require_serial: true
additional_dependencies: []
minimum_pre_commit_version: '2.9.2'