2020-05-17 18:24:58 +02:00
|
|
|
repos:
|
2020-08-14 16:12:24 -04:00
|
|
|
|
|
|
|
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
2022-04-13 15:33:49 -04:00
|
|
|
rev: v4.2.0
|
2020-08-14 16:12:24 -04:00
|
|
|
hooks:
|
|
|
|
|
- id: check-case-conflict
|
|
|
|
|
- id: check-merge-conflict
|
|
|
|
|
- id: check-yaml
|
2021-04-25 12:38:28 -04:00
|
|
|
- id: check-toml
|
|
|
|
|
- id: debug-statements
|
2020-08-14 16:12:24 -04:00
|
|
|
- id: end-of-file-fixer
|
2020-12-12 14:47:14 +00:00
|
|
|
exclude: (cibuildwheel/resources/pinned_docker_images.cfg)|(.svg$)
|
2020-08-14 16:12:24 -04:00
|
|
|
- id: mixed-line-ending
|
|
|
|
|
- id: trailing-whitespace
|
|
|
|
|
|
2021-05-31 13:49:46 -04:00
|
|
|
- repo: https://github.com/asottile/pyupgrade
|
2022-05-10 07:51:05 +02:00
|
|
|
rev: v2.32.1
|
2021-05-31 13:49:46 -04:00
|
|
|
hooks:
|
|
|
|
|
- id: pyupgrade
|
|
|
|
|
name: PyUpgrade 3.6+
|
|
|
|
|
args: ["--py36-plus"]
|
|
|
|
|
exclude: ^bin/
|
|
|
|
|
- id: pyupgrade
|
|
|
|
|
name: PyUpgrade 3.7+ on bin
|
|
|
|
|
exclude: ^(cibuildwheel|unit_test|test)/
|
|
|
|
|
args: ["--py37-plus"]
|
|
|
|
|
|
2021-09-25 05:41:09 -04:00
|
|
|
# Autoremoves unused imports
|
|
|
|
|
- repo: https://github.com/hadialqattan/pycln
|
2022-05-24 12:13:13 -04:00
|
|
|
rev: v1.3.3
|
2021-09-25 05:41:09 -04:00
|
|
|
hooks:
|
|
|
|
|
- id: pycln
|
2022-03-29 16:58:32 -04:00
|
|
|
args: [--all]
|
2022-04-01 22:00:07 -04:00
|
|
|
stages: [manual]
|
2021-09-25 05:41:09 -04:00
|
|
|
|
2021-01-05 17:54:08 -05:00
|
|
|
- repo: https://github.com/PyCQA/isort
|
2021-11-21 14:33:03 +01:00
|
|
|
rev: 5.10.1
|
2021-01-05 17:54:08 -05:00
|
|
|
hooks:
|
|
|
|
|
- id: isort
|
|
|
|
|
|
2021-01-15 15:40:03 +01:00
|
|
|
- repo: https://github.com/psf/black
|
2022-03-29 10:10:47 -04:00
|
|
|
rev: 22.3.0
|
2021-01-15 15:40:03 +01:00
|
|
|
hooks:
|
|
|
|
|
- id: black
|
|
|
|
|
|
2021-04-25 12:38:28 -04:00
|
|
|
- repo: https://github.com/asottile/setup-cfg-fmt
|
2022-04-05 00:53:33 -04:00
|
|
|
rev: v1.20.1
|
2021-04-25 12:38:28 -04:00
|
|
|
hooks:
|
|
|
|
|
- id: setup-cfg-fmt
|
|
|
|
|
|
2020-08-14 16:12:24 -04:00
|
|
|
- repo: https://github.com/pre-commit/mirrors-mypy
|
2022-06-06 18:55:06 +02:00
|
|
|
rev: v0.960
|
2020-08-14 16:12:24 -04:00
|
|
|
hooks:
|
|
|
|
|
- id: mypy
|
2022-02-11 10:17:40 -05:00
|
|
|
name: mypy 3.6 on cibuildwheel/
|
2021-06-22 13:18:22 +01:00
|
|
|
exclude: ^(bin|cibuildwheel/resources|docs)/.*py$
|
2022-04-01 22:00:07 -04:00
|
|
|
args: ["--python-version=3.6"]
|
2021-10-16 21:31:20 -04:00
|
|
|
additional_dependencies: &mypy-dependencies
|
2021-10-26 15:56:35 -04:00
|
|
|
- nox
|
2021-10-16 21:31:20 -04:00
|
|
|
- packaging>=21.0
|
2021-10-26 15:56:35 -04:00
|
|
|
- pygithub
|
2021-10-16 21:31:20 -04:00
|
|
|
- rich
|
2021-10-15 11:30:16 -04:00
|
|
|
- tomli
|
2021-10-16 21:31:20 -04:00
|
|
|
- types-certifi
|
|
|
|
|
- types-click
|
2021-09-19 00:19:28 -04:00
|
|
|
- types-dataclasses
|
2021-10-16 21:31:20 -04:00
|
|
|
- types-jinja2
|
|
|
|
|
- types-pyyaml
|
|
|
|
|
- types-requests
|
2021-10-26 15:56:35 -04:00
|
|
|
- bracex
|
2022-02-11 10:17:40 -05:00
|
|
|
- dataclasses
|
2021-01-31 17:14:15 -05:00
|
|
|
- id: mypy
|
|
|
|
|
name: mypy 3.7+ on bin/
|
2021-10-26 15:56:35 -04:00
|
|
|
files: ^((bin|docs)/.*py)$
|
2022-04-01 22:00:07 -04:00
|
|
|
args: ["--python-version=3.7"]
|
2022-02-11 10:17:40 -05:00
|
|
|
additional_dependencies: *mypy-dependencies
|
|
|
|
|
- id: mypy
|
|
|
|
|
name: mypy 3.10
|
2022-04-01 22:00:07 -04:00
|
|
|
args: ["--python-version=3.10"]
|
2021-10-16 21:31:20 -04:00
|
|
|
additional_dependencies: *mypy-dependencies
|
|
|
|
|
|
|
|
|
|
- repo: https://github.com/asottile/yesqa
|
2021-10-25 18:14:46 -04:00
|
|
|
rev: v1.3.0
|
2021-10-16 21:31:20 -04:00
|
|
|
hooks:
|
|
|
|
|
- id: yesqa
|
|
|
|
|
additional_dependencies: &flake8-dependencies
|
|
|
|
|
- flake8-bugbear
|
2021-01-02 10:07:54 -05:00
|
|
|
|
2021-04-05 16:44:43 +00:00
|
|
|
- repo: https://github.com/PyCQA/flake8
|
2021-10-11 17:49:31 +00:00
|
|
|
rev: 4.0.1
|
2021-01-02 19:04:47 -05:00
|
|
|
hooks:
|
|
|
|
|
- id: flake8
|
|
|
|
|
exclude: cibuildwheel/resources/
|
2021-10-16 21:31:20 -04:00
|
|
|
additional_dependencies: *flake8-dependencies
|
|
|
|
|
|
|
|
|
|
- repo: https://github.com/pre-commit/pygrep-hooks
|
|
|
|
|
rev: v1.9.0
|
|
|
|
|
hooks:
|
|
|
|
|
- id: python-check-blanket-noqa
|
|
|
|
|
stages: [manual]
|
|
|
|
|
- id: python-no-log-warn
|
|
|
|
|
- id: python-no-eval
|
|
|
|
|
- id: python-use-type-annotations
|
|
|
|
|
|
|
|
|
|
- repo: https://github.com/shellcheck-py/shellcheck-py
|
2022-02-11 16:09:31 -05:00
|
|
|
rev: v0.8.0.4
|
2021-10-16 21:31:20 -04:00
|
|
|
hooks:
|
|
|
|
|
- id: shellcheck
|
2021-02-04 22:08:18 -05:00
|
|
|
|
|
|
|
|
- repo: local
|
|
|
|
|
hooks:
|
|
|
|
|
- id: disallow-caps
|
|
|
|
|
name: Disallow improper capitalization
|
|
|
|
|
language: pygrep
|
2021-07-14 13:45:04 -04:00
|
|
|
entry: PyBind|Numpy|Cmake|Github|PyTest
|
2021-02-04 22:08:18 -05:00
|
|
|
types:
|
|
|
|
|
- markdown
|
2021-07-20 08:59:19 +01:00
|
|
|
- id: update-readme-changelog
|
|
|
|
|
name: Update README changelog
|
|
|
|
|
language: python
|
|
|
|
|
entry: bin/update_readme_changelog.py
|
|
|
|
|
files: ^docs/changelog.md$
|
2021-07-14 13:45:04 -04:00
|
|
|
|
|
|
|
|
- repo: https://github.com/codespell-project/codespell
|
|
|
|
|
rev: v2.1.0
|
|
|
|
|
hooks:
|
|
|
|
|
- id: codespell
|
|
|
|
|
args: ["-L", "sur"]
|