2022-03-02 18:11:36 +00:00
|
|
|
exclude: (^.*patches|.*\.cgi$|^packages/micropip/src/micropip/externals|^benchmark/benchmarks$)
|
2021-06-25 22:04:10 +00:00
|
|
|
default_language_version:
|
2022-03-17 22:48:56 +00:00
|
|
|
python: "3.10"
|
2020-06-27 12:57:48 +00:00
|
|
|
repos:
|
2021-07-25 15:02:33 +00:00
|
|
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
2022-06-14 00:05:38 +00:00
|
|
|
rev: "v4.3.0"
|
2020-06-27 12:57:48 +00:00
|
|
|
hooks:
|
2022-03-08 05:51:20 +00:00
|
|
|
- id: check-added-large-files
|
|
|
|
- id: check-case-conflict
|
|
|
|
- id: check-merge-conflict
|
|
|
|
- id: check-symlinks
|
2021-07-25 15:02:33 +00:00
|
|
|
- id: check-yaml
|
2022-02-19 08:06:25 +00:00
|
|
|
exclude: .clang-format
|
2022-03-08 05:51:20 +00:00
|
|
|
- id: debug-statements
|
2021-07-25 15:02:33 +00:00
|
|
|
- id: end-of-file-fixer
|
2022-03-08 05:51:20 +00:00
|
|
|
- id: mixed-line-ending
|
2021-07-25 15:02:33 +00:00
|
|
|
- id: trailing-whitespace
|
2022-02-19 08:06:25 +00:00
|
|
|
|
2022-02-21 22:27:03 +00:00
|
|
|
- repo: https://github.com/PyCQA/isort
|
|
|
|
rev: "5.10.1"
|
|
|
|
hooks:
|
|
|
|
- id: isort
|
|
|
|
|
2022-02-20 22:13:37 +00:00
|
|
|
- repo: https://github.com/asottile/pyupgrade
|
2022-07-28 07:20:07 +00:00
|
|
|
rev: "v2.37.2"
|
2022-02-20 22:13:37 +00:00
|
|
|
hooks:
|
|
|
|
- id: pyupgrade
|
2022-07-19 15:43:12 +00:00
|
|
|
name: pyupgrade
|
2022-04-01 22:36:55 +00:00
|
|
|
args: ["--py310-plus"]
|
2022-07-19 15:43:12 +00:00
|
|
|
exclude: docs
|
2022-02-20 22:13:37 +00:00
|
|
|
|
|
|
|
- repo: https://github.com/hadialqattan/pycln
|
2022-07-19 15:43:12 +00:00
|
|
|
rev: "v2.0.4"
|
2022-02-20 22:13:37 +00:00
|
|
|
hooks:
|
|
|
|
- id: pycln
|
|
|
|
args: [--config=pyproject.toml]
|
|
|
|
stages: [manual]
|
|
|
|
|
2021-07-25 15:02:33 +00:00
|
|
|
- repo: https://github.com/psf/black
|
2022-07-04 22:06:00 +00:00
|
|
|
rev: "22.6.0"
|
2020-06-28 18:24:40 +00:00
|
|
|
hooks:
|
2021-07-25 15:02:33 +00:00
|
|
|
- id: black
|
2022-02-19 08:06:25 +00:00
|
|
|
|
2022-03-14 21:08:50 +00:00
|
|
|
- repo: https://github.com/pycqa/flake8
|
2022-02-27 17:39:53 +00:00
|
|
|
rev: "4.0.1"
|
2020-06-28 18:24:40 +00:00
|
|
|
hooks:
|
2021-07-25 15:02:33 +00:00
|
|
|
- id: flake8
|
2022-02-27 17:39:53 +00:00
|
|
|
additional_dependencies: [flake8-bugbear]
|
2022-02-19 08:06:25 +00:00
|
|
|
|
2021-07-25 15:02:33 +00:00
|
|
|
- repo: https://github.com/pre-commit/mirrors-mypy
|
2022-07-28 07:20:07 +00:00
|
|
|
rev: "v0.971"
|
2020-08-16 17:35:32 +00:00
|
|
|
hooks:
|
2021-07-25 15:02:33 +00:00
|
|
|
- id: mypy
|
2022-04-01 19:58:54 +00:00
|
|
|
files: ^(packages/.*/src|src|pyodide-build/pyodide_build)
|
2022-09-12 18:18:40 +00:00
|
|
|
exclude: (setup.py|src/tests|conftest.py|packages/.*/test)
|
2022-04-01 19:58:54 +00:00
|
|
|
args: []
|
2022-02-19 08:06:25 +00:00
|
|
|
additional_dependencies: &mypy-deps
|
|
|
|
- packaging
|
|
|
|
- types-docutils
|
|
|
|
- types-pyyaml
|
|
|
|
- types-setuptools
|
2022-04-01 19:58:54 +00:00
|
|
|
- numpy
|
2022-05-20 06:27:02 +00:00
|
|
|
- build
|
2022-05-21 20:35:02 +00:00
|
|
|
- pytest
|
2022-09-11 07:20:56 +00:00
|
|
|
- pydantic
|
2022-02-19 08:06:25 +00:00
|
|
|
- id: mypy
|
2022-04-01 19:58:54 +00:00
|
|
|
name: mypy-tests
|
|
|
|
args: [--ignore-missing-imports]
|
|
|
|
files: ^(packages/|docs|conftest.py|src/tests)
|
|
|
|
exclude: (^packages/.*/setup.py|/src)
|
2022-02-19 08:06:25 +00:00
|
|
|
additional_dependencies: *mypy-deps
|
|
|
|
|
|
|
|
- repo: https://github.com/pre-commit/mirrors-clang-format
|
2022-07-04 22:06:00 +00:00
|
|
|
rev: "v14.0.6"
|
2020-12-31 01:57:41 +00:00
|
|
|
hooks:
|
2021-07-25 15:02:33 +00:00
|
|
|
- id: clang-format
|
2022-02-24 04:58:11 +00:00
|
|
|
types_or: [c++, c, cuda]
|
2021-07-25 15:02:33 +00:00
|
|
|
|
|
|
|
- repo: https://github.com/pre-commit/mirrors-prettier
|
2022-06-22 18:14:45 +00:00
|
|
|
rev: "v2.7.1"
|
2021-07-25 15:02:33 +00:00
|
|
|
hooks:
|
|
|
|
- id: prettier
|
2022-03-08 05:51:20 +00:00
|
|
|
|
|
|
|
- repo: https://github.com/pre-commit/pygrep-hooks
|
|
|
|
rev: "v1.9.0"
|
|
|
|
hooks:
|
|
|
|
- id: python-check-blanket-noqa
|
|
|
|
- id: python-check-blanket-type-ignore
|
|
|
|
- id: python-no-log-warn
|
|
|
|
- id: python-no-eval
|
2022-05-06 21:27:29 +00:00
|
|
|
exclude: ^(src/py/_pyodide/_base\.py|src/tests/test_typeconversions\.py|src/py/pyodide/_run_js.py)$
|
2022-03-08 05:51:20 +00:00
|
|
|
- id: python-use-type-annotations
|
|
|
|
exclude: docs/sphinx_pyodide/tests/test_directives\.py
|
|
|
|
- id: rst-backticks
|
|
|
|
- id: rst-directive-colons
|
|
|
|
- id: rst-inline-touching-normal
|
|
|
|
|
|
|
|
- repo: https://github.com/shellcheck-py/shellcheck-py
|
|
|
|
rev: "v0.8.0.4"
|
|
|
|
hooks:
|
|
|
|
- id: shellcheck
|
2022-09-05 16:15:13 +00:00
|
|
|
exclude: ^tools/python$
|
2022-03-08 05:51:20 +00:00
|
|
|
|
|
|
|
- repo: https://github.com/codespell-project/codespell
|
|
|
|
rev: "v2.1.0"
|
|
|
|
hooks:
|
|
|
|
- id: codespell
|
2022-07-06 21:34:22 +00:00
|
|
|
args: ["-L", "te,slowy,aray,ba,nd,classs,crate,feld,lits"]
|
2022-03-08 05:51:20 +00:00
|
|
|
exclude: ^benchmark/benchmarks/pystone_benchmarks/pystone\.py$
|