2021-08-02 20:48:22 +03:00
|
|
|
repos:
|
2021-11-09 21:57:40 +03:00
|
|
|
- repo: local
|
|
|
|
hooks:
|
|
|
|
- id: build-workflows
|
|
|
|
name: Validate github action workflows
|
|
|
|
entry: ./tests/build-workflows.py --fail-on-update
|
|
|
|
language: python
|
|
|
|
pass_filenames: false
|
2021-12-17 05:52:46 +03:00
|
|
|
- repo: local
|
|
|
|
hooks:
|
|
|
|
- id: init_py_files
|
|
|
|
name: __init__.py files
|
|
|
|
entry: python3 tests/build-init-files.py -v --root .
|
|
|
|
language: python
|
|
|
|
pass_filenames: false
|
|
|
|
additional_dependencies: [click~=7.1]
|
2022-02-15 18:28:53 +03:00
|
|
|
# The following, commented hook is the usual way to add isort. However, it doesn't work in some environments.
|
|
|
|
# See https://github.com/PyCQA/isort/issues/1874#issuecomment-1002212936
|
|
|
|
# -----------------------------------------------------
|
|
|
|
# - repo: https://github.com/pycqa/isort
|
|
|
|
# rev: 5.9.3
|
|
|
|
# hooks:
|
|
|
|
# - id: isort
|
|
|
|
# -----------------------------------------------------
|
|
|
|
# The hook below is the workaround for the issue above.
|
|
|
|
- repo: local
|
|
|
|
hooks:
|
|
|
|
- id: isort
|
|
|
|
name: isort
|
|
|
|
entry: isort
|
|
|
|
require_serial: true
|
|
|
|
language: python
|
|
|
|
language_version: python3
|
|
|
|
types_or: [cython, pyi, python]
|
|
|
|
args: ['--filter-files']
|
|
|
|
minimum_pre_commit_version: '2.9.2'
|
|
|
|
additional_dependencies: [isort==5.10.1]
|
2021-08-02 20:48:22 +03:00
|
|
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
2021-09-08 04:18:43 +03:00
|
|
|
rev: v4.0.1
|
2021-08-02 20:48:22 +03:00
|
|
|
hooks:
|
|
|
|
- id: check-yaml
|
|
|
|
- id: end-of-file-fixer
|
|
|
|
exclude: ".*?(.hex|.clvm|.clib)"
|
|
|
|
- id: trailing-whitespace
|
|
|
|
- id: check-merge-conflict
|
|
|
|
- id: check-ast
|
|
|
|
- id: debug-statements
|
|
|
|
- repo: https://github.com/psf/black
|
2022-02-21 08:33:09 +03:00
|
|
|
rev: 21.12b0
|
2021-08-02 20:48:22 +03:00
|
|
|
hooks:
|
|
|
|
- id: black
|
|
|
|
- repo: https://gitlab.com/pycqa/flake8
|
2021-09-08 04:18:43 +03:00
|
|
|
rev: 3.9.2
|
2021-08-02 20:48:22 +03:00
|
|
|
hooks:
|
|
|
|
- id: flake8
|
|
|
|
- repo: https://github.com/pre-commit/mirrors-mypy
|
2022-03-17 18:44:28 +03:00
|
|
|
rev: v0.941
|
2021-08-02 20:48:22 +03:00
|
|
|
hooks:
|
|
|
|
- id: mypy
|
2022-03-12 17:52:47 +03:00
|
|
|
additional_dependencies: [filelock, pytest, pytest-asyncio, types-aiofiles, types-click, types-setuptools, types-PyYAML]
|
2021-11-23 23:44:53 +03:00
|
|
|
# This intentionally counters the settings in mypy.ini to allow a loose local
|
|
|
|
# check and a strict CI check. This difference may or may not be retained long
|
|
|
|
# term.
|
|
|
|
args: [--no-warn-unused-ignores]
|