forked from openai/ml-agents
-
Notifications
You must be signed in to change notification settings - Fork 2
/
.pre-commit-config.yaml
53 lines (53 loc) · 1.85 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
repos:
- repo: https://github.com/python/black
rev: 19.3b0
hooks:
- id: black
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.720
hooks:
- id: mypy
name: mypy-ml-agents
files: "ml-agents/.*"
args: [--ignore-missing-imports, --disallow-incomplete-defs]
- id: mypy
name: mypy-ml-agents-envs
files: "ml-agents-envs/.*"
# Exclude protobuf files and don't follow them when imported
exclude: ".*_pb2.py"
args: [--ignore-missing-imports, --disallow-incomplete-defs]
- id: mypy
name: mypy-gym-unity
files: "gym-unity/.*"
args: [--ignore-missing-imports, --disallow-incomplete-defs]
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.2.3
hooks:
- id: mixed-line-ending
exclude: >
(?x)^(
.*cs.meta|
.*.css
)$
args: [--fix=lf]
- id: flake8
exclude: >
(?x)^(
.*_pb2.py|
.*_pb2_grpc.py
)$
# "Local" hooks, see https://pre-commit.com/#repository-local-hooks
- repo: local
hooks:
- id: markdown-link-check
name: markdown-link-check
# markdown-link-check doesn't support multiple files on the commandline, so this hacks around that.
# Note that you must install the package separately via npm. For example:
# brew install npm; npm install -g markdown-link-check
entry: bash -xc 'echo "$@" | xargs -n1 -t markdown-link-check -c markdown-link-check.config.json' --
language: system
types: [markdown]
# Don't check localized files since their target might not be localized.
exclude: ".*localized.*"
# Only run manually, e.g. pre-commit run --hook-stage manual markdown-link-check
stages: [manual]