# Copyright (c) 2019-2022, NVIDIA CORPORATION. repos: - repo: https://github.com/pre-commit/pre-commit-hooks rev: v4.4.0 hooks: - id: trailing-whitespace - id: end-of-file-fixer - repo: https://github.com/PyCQA/isort rev: 5.12.0 hooks: - id: isort args: ["--config-root=python/", "--resolve-all-configs"] files: python/.* types_or: [python, cython, pyi] - id: isort args: ["--config-root=legate/", "--resolve-all-configs"] files: legate/.* types_or: [python, cython, pyi] - repo: https://github.com/psf/black rev: 23.3.0 hooks: - id: black files: (python|legate)/.* args: ["--config", "python/pyproject.toml"] - repo: https://github.com/PyCQA/flake8 rev: 6.0.0 hooks: - id: flake8 args: ["--config=.flake8"] files: (python|legate)/.*$ types: [file] types_or: [python, cython] additional_dependencies: ["flake8-force"] - repo: https://github.com/MarcoGorelli/cython-lint rev: v0.15.0 hooks: - id: cython-lint - repo: https://github.com/pre-commit/mirrors-mypy rev: 'v1.3.0' hooks: - id: mypy additional_dependencies: [types-cachetools] args: ["--config-file=python/pyproject.toml", "python/kvikio", "python/tests", "python/examples", "python/benchmarks"] pass_filenames: false - repo: https://github.com/pre-commit/mirrors-clang-format rev: v16.0.6 hooks: - id: clang-format types_or: [c, c++, cuda] args: ["-fallback-style=none", "-style=file", "-i"] - repo: local hooks: - id: copyright-check name: copyright-check entry: python ./ci/checks/copyright.py --git-modified-only --update-current-year language: python pass_filenames: false additional_dependencies: [gitpython] - id: cmake-format name: cmake-format entry: ./cpp/scripts/run-cmake-format.sh cmake-format language: python types: [cmake] # Note that pre-commit autoupdate does not update the versions # of dependencies, so we'll have to update this manually. additional_dependencies: - cmakelang==0.6.13 verbose: true require_serial: true - id: cmake-lint name: cmake-lint entry: ./cpp/scripts/run-cmake-format.sh cmake-lint language: python types: [cmake] # Note that pre-commit autoupdate does not update the versions # of dependencies, so we'll have to update this manually. additional_dependencies: - cmakelang==0.6.13 verbose: true require_serial: true - repo: https://github.com/codespell-project/codespell rev: v2.2.4 hooks: - id: codespell exclude: | (?x)^( ^CHANGELOG.md$ ) - repo: https://github.com/rapidsai/dependency-file-generator rev: v1.5.2 hooks: - id: rapids-dependency-file-generator args: ["--clean"] default_language_version: python: python3