forked from nucypher/nucypher
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.pre-commit-config.yaml
81 lines (67 loc) · 2.01 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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
exclude: '^nucypher/blockchain/eth/contract_registry/*'
repos:
- repo: local
hooks:
# Custom
- id: Validate CircleCI
name: Validate CircleCI Config
entry: ./scripts/hooks/validate_circleci_config.sh
language: script
- id: tests
name: Run Nucypher Unit Tests
entry: scripts/hooks/run_unit_tests.sh
language: system
types: [python]
stages: [push] # required additional setup: pre-commit install && pre-commit install -t pre-push
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.3.0
hooks:
# Git
- id: forbid-new-submodules
# Files
- id: check-byte-order-marker
- id: check-executables-have-shebangs
- id: check-added-large-files
- id: check-symlinks
- id: end-of-file-fixer
# Syntax
- id: check-yaml
- id: check-toml
- id: check-ast
# Code
- id: check-merge-conflict
- id: debug-statements
- id: detect-private-key
# Docs
- id: check-vcs-permalinks
- repo: https://github.com/Lucas-C/pre-commit-hooks
rev: ffbd448645bad2e7ca13f96fca5830058d27ccd5
hooks:
# License
- id: insert-license
files: \.py$ # only target python files, for example - skip contract_registry.json
args: [--license-filepath, '.nucypher-license', --detect-license-in-X-top-lines=16, --comment-style, '"""||"""']
- repo: https://github.com/akaihola/darker
rev: 1.4.2
hooks:
- id: darker
args: [--isort]
additional_dependencies:
- isort~=5.9
# TODO: May be incrementally introduced
# - repo: https://github.com/PyCQA/bandit
# rev: '1.6.2'
# hooks:
# - id: bandit
# args: [--recursive, --ini, .bandit, aggregate, file]
# files: .py$
#
# - repo: https://gitlab.com/pycqa/flake8
# rev: '3.7.9'
# hooks:
# - id: flake8
# - repo: https://github.com/psf/black
# rev: stable
# hooks:
# - id: black
# language_version: python3.6