2019-06-25 19:40:27 +03:00
|
|
|
repos:
|
|
|
|
- repo: https://github.com/python/black
|
2019-07-09 02:34:54 +03:00
|
|
|
rev: 19.3b0
|
2019-06-25 19:40:27 +03:00
|
|
|
hooks:
|
|
|
|
- id: black
|
2019-09-25 23:12:44 +03:00
|
|
|
exclude: >
|
|
|
|
(?x)^(
|
|
|
|
.*_pb2.py|
|
|
|
|
.*_pb2_grpc.py
|
|
|
|
)$
|
2019-10-12 02:18:54 +03:00
|
|
|
|
2019-06-26 02:56:48 +03:00
|
|
|
- repo: https://github.com/pre-commit/mirrors-mypy
|
2019-11-15 22:11:56 +03:00
|
|
|
rev: v0.740
|
2019-06-26 02:56:48 +03:00
|
|
|
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
|
2019-07-09 02:36:30 +03:00
|
|
|
exclude: ".*_pb2.py"
|
2019-09-19 02:06:52 +03:00
|
|
|
args: [--ignore-missing-imports, --disallow-incomplete-defs]
|
2019-06-26 02:56:48 +03:00
|
|
|
- id: mypy
|
|
|
|
name: mypy-gym-unity
|
|
|
|
files: "gym-unity/.*"
|
|
|
|
args: [--ignore-missing-imports, --disallow-incomplete-defs]
|
2019-10-12 02:18:54 +03:00
|
|
|
|
2019-07-02 00:56:38 +03:00
|
|
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
2019-11-15 22:11:56 +03:00
|
|
|
rev: v2.4.0
|
2019-07-02 00:56:38 +03:00
|
|
|
hooks:
|
|
|
|
- id: mixed-line-ending
|
|
|
|
exclude: >
|
|
|
|
(?x)^(
|
|
|
|
.*cs.meta|
|
2019-09-26 01:51:18 +03:00
|
|
|
.*.css|
|
|
|
|
.*.meta
|
2019-07-02 00:56:38 +03:00
|
|
|
)$
|
2019-07-09 01:55:24 +03:00
|
|
|
args: [--fix=lf]
|
|
|
|
- id: flake8
|
2019-07-09 02:16:22 +03:00
|
|
|
exclude: >
|
|
|
|
(?x)^(
|
|
|
|
.*_pb2.py|
|
|
|
|
.*_pb2_grpc.py
|
|
|
|
)$
|
2019-11-14 05:23:57 +03:00
|
|
|
# flake8-tidy-imports is used for banned-modules, not actually tidying
|
|
|
|
additional_dependencies: [flake8-comprehensions, flake8-tidy-imports]
|
2019-10-24 01:59:36 +03:00
|
|
|
- id: trailing-whitespace
|
|
|
|
name: trailing-whitespace-markdown
|
|
|
|
types: [markdown]
|
2019-11-15 02:03:59 +03:00
|
|
|
- id: check-merge-conflict
|
|
|
|
args: [--assume-in-merge]
|
2019-10-12 02:18:54 +03:00
|
|
|
|
|
|
|
- repo: https://github.com/pre-commit/pygrep-hooks
|
2019-11-15 22:11:56 +03:00
|
|
|
rev: v1.4.2
|
2019-10-12 02:18:54 +03:00
|
|
|
hooks:
|
|
|
|
- id: python-check-mock-methods
|
|
|
|
|
2019-11-02 00:33:35 +03:00
|
|
|
|
|
|
|
|
|
|
|
- repo: https://github.com/pre-commit/mirrors-pylint
|
2019-11-15 22:11:56 +03:00
|
|
|
rev: v2.4.4
|
2019-11-02 00:33:35 +03:00
|
|
|
hooks:
|
|
|
|
- id: pylint
|
|
|
|
exclude: >
|
|
|
|
(?x)^(
|
|
|
|
.*_pb2.py|
|
|
|
|
.*_pb2_grpc.py|
|
|
|
|
.*/tests/.*
|
|
|
|
)$
|
2019-11-09 02:44:09 +03:00
|
|
|
args: [--score=n]
|
2019-11-02 00:33:35 +03:00
|
|
|
|
2019-09-13 00:32:27 +03:00
|
|
|
# "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
|
2019-10-29 02:09:26 +03:00
|
|
|
entry: bash -xc 'echo "$@" | xargs -n1 -t markdown-link-check -c markdown-link-check.fast.json' --
|
2019-09-13 00:32:27 +03:00
|
|
|
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]
|
2019-10-29 02:09:26 +03:00
|
|
|
- id: markdown-link-check-full
|
|
|
|
name: markdown-link-check-full
|
|
|
|
entry: bash -xc 'echo "$@" | xargs -n1 -t markdown-link-check -c markdown-link-check.full.json' --
|
|
|
|
language: system
|
|
|
|
types: [markdown]
|
|
|
|
exclude: ".*localized.*"
|
|
|
|
stages: [manual]
|
2019-10-25 00:02:23 +03:00
|
|
|
- id: validate-versions
|
|
|
|
name: validate library versions
|
|
|
|
language: script
|
|
|
|
entry: utils/validate_versions.py
|
|
|
|
files: ".*/setup.py"
|