This repository has been archived by the owner on Sep 22, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy path.pre-commit-config.yaml
110 lines (104 loc) · 3.3 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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
#=============================================================================
# Copyright (c) 2021 SeisSpark (https://github.com/kdeyev/SeisSpark).
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#=============================================================================
default_language_version:
python: python3.6
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.4.0
hooks:
#- id: detect-aws-credentials
- id: check-added-large-files
- id: check-json
#- id: check-yaml
- id: end-of-file-fixer
- id: trailing-whitespace
- id: check-executables-have-shebangs
- id: debug-statements
- id: check-merge-conflict
- repo: local
hooks:
- id: autoflake
name: autoflake
stages: [commit]
language: system
args:
- --in-place
- --remove-unused-variables
- --remove-all-unused-imports
- --expand-star-imports
entry: pipenv run autoflake
types: [python]
- id: isort
name: isort
stages: [commit]
language: system
entry: pipenv run isort
types: [python]
- id: black
name: black
stages: [commit]
language: system
entry: pipenv run black
types: [python]
- id: flake8
name: flake8
stages: [commit]
language: system
entry: pipenv run flake8
types: [python]
- id: mypy
name: mypy
stages: [commit]
language: system
entry: pipenv run mypy
types: [python]
require_serial: true
# - id: pytest
# name: pytest
# stages: [commit]
# language: system
# entry: pipenv run pytest -s tests/pytests/unit-tests
# types: [python]
# pass_filenames: false
# - id: pytest-cov
# name: pytest
# stages: [push]
# language: system
# entry: pipenv run pytest --cov --cov-fail-under=100
# types: [python]
- repo: https://github.com/kdeyev/licenseheaders.git
rev: 8ad4573eedcbe5c19ebca70b1b2421b76f137e3b
hooks:
- id: licenseheaders
args: ["-t", ".copyright.tmpl", "-s", "type-settings.json", "-cy", "-f"]
- repo: https://github.com/asottile/pyupgrade
rev: v1.25.0
hooks:
- id: pyupgrade
args: [--py36-plus]
- repo: https://github.com/ikamensh/flynt/
rev: 4c65a4d0f18e824d5d60913b4aec3cb291fafd9b
hooks:
- id: flynt
# - repo: git://github.com/awebdeveloper/pre-commit-tslint/
# rev: "" # Use the sha or tag you want to point at
# hooks:
# - id: tslint
# additional_dependencies: ["tslint@5.0.0"]
# - repo: https://github.com/pre-commit/mirrors-prettier
# rev: "" # Use the sha or tag you want to point at
# hooks:
# - id: prettier