diff --git a/.dockerignore b/.dockerignore index 1d4af3035..cf38a2bba 100644 --- a/.dockerignore +++ b/.dockerignore @@ -11,7 +11,7 @@ .gitattributes .github .gitignore -.pre-commit-config.yaml +prek.toml .vscode .prettierrc .vale.ini diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml deleted file mode 100644 index 60750e61c..000000000 --- a/.pre-commit-config.yaml +++ /dev/null @@ -1,477 +0,0 @@ ---- -fail_fast: true - -.uv_version: &uv_version uv==0.11.7 - -# See https://pre-commit.com for more information -# See https://pre-commit.com/hooks.html for more hooks -default_install_hook_types: [pre-commit, pre-push] - -repos: - - repo: meta - hooks: - - id: check-useless-excludes - stages: [pre-commit] - - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v6.0.0 - hooks: - - id: check-added-large-files - stages: [pre-commit] - - id: check-case-conflict - stages: [pre-commit] - - id: check-executables-have-shebangs - stages: [pre-commit] - - id: check-merge-conflict - stages: [pre-commit] - - id: check-shebang-scripts-are-executable - stages: [pre-commit] - - id: check-symlinks - stages: [pre-commit] - - id: check-json - stages: [pre-commit] - - id: check-toml - stages: [pre-commit] - - id: check-vcs-permalinks - stages: [pre-commit] - - id: check-yaml - stages: [pre-commit] - - id: end-of-file-fixer - stages: [pre-commit] - - id: file-contents-sorter - files: spelling_private_dict\.txt$ - stages: [pre-commit] - - id: trailing-whitespace - stages: [pre-commit] - - repo: https://github.com/pre-commit/pygrep-hooks - rev: v1.10.0 - hooks: - - id: rst-directive-colons - stages: [pre-commit] - - id: rst-inline-touching-normal - stages: [pre-commit] - - id: text-unicode-replacement-char - stages: [pre-commit] - - id: rst-backticks - - stages: [pre-commit] - - repo: https://github.com/AleksaC/hadolint-py - rev: v2.15.1 - hooks: - - id: hadolint - - stages: [pre-commit] - - repo: local - hooks: - - id: pytest-check-partition - name: pytest-check-partition - entry: >- - bash -c 'uv run --extra=dev python -c - "import json, yaml; - print(json.dumps(yaml.safe_load(open(\".github/workflows/test.yml\"))))" - | jq -r '\''.jobs["ci-tests"].strategy.matrix.ci_pattern[]'\'' - | uv run --extra=dev pytest-check-partition --patterns-stdin - --disable-plugin pytest-retry - --disable-plugin pytest_beartype_tests - --extra-arg=--disable-warnings' - stages: [pre-push] - language: python - types_or: [yaml, python] - pass_filenames: false - additional_dependencies: - - *uv_version - - - id: actionlint - name: actionlint - entry: uv run --extra=dev actionlint - language: python - pass_filenames: false - types_or: [yaml] - additional_dependencies: - - *uv_version - stages: [pre-commit] - - - id: pydocstringformatter - name: pydocstringformatter - entry: uv run --extra=dev pydocstringformatter - language: python - types_or: [python] - additional_dependencies: - - *uv_version - stages: [pre-commit] - - - id: shellcheck - name: shellcheck - entry: uv run --extra=dev shellcheck --shell=bash - language: python - types_or: [shell] - additional_dependencies: - - *uv_version - stages: [pre-commit] - - - id: shellcheck-docs - name: shellcheck-docs - # We exclude SC2215 as it is a false positive for an unknown reason on Windows. - entry: uv run --extra=dev doccmd --no-write-to-file --language=shell --language=console - --command="shellcheck --shell=bash --exclude=SC2215" - language: python - types_or: [markdown, rst] - additional_dependencies: - - *uv_version - stages: [pre-commit] - - - id: shfmt - name: shfmt - entry: uv run --extra=dev shfmt --write --space-redirects --indent=4 - language: python - types_or: [shell] - additional_dependencies: - - *uv_version - stages: [pre-commit] - - - id: shfmt-docs - name: shfmt-docs - entry: uv run --extra=dev doccmd --language=shell --language=console --skip-marker=shfmt - --no-pad-file --command="shfmt --write --space-redirects --indent=4" - language: python - types_or: [markdown, rst] - additional_dependencies: - - *uv_version - stages: [pre-commit] - - - id: mypy - name: mypy - stages: [pre-push] - entry: uv run --extra=dev -m mypy --num-workers=4 - language: python - types_or: [python, toml] - pass_filenames: false - additional_dependencies: - - *uv_version - - # We do not use --example-workers 0 due to https://github.com/python/mypy/issues/18283 - - id: mypy-docs - name: mypy-docs - stages: [pre-push] - entry: uv run --extra=dev doccmd --no-write-to-file --language=python --command="mypy - --num-workers=4" - language: python - types_or: [markdown, rst] - - - id: check-manifest - name: check-manifest - stages: [pre-push] - entry: uv run --extra=dev -m check_manifest - language: python - pass_filenames: false - additional_dependencies: - - *uv_version - - - id: pyright - name: pyright - stages: [pre-push] - entry: uv run --extra=dev -m pyright . - language: python - types_or: [python, toml] - pass_filenames: false - additional_dependencies: - - *uv_version - - - id: pyright-docs - name: pyright-docs - stages: [pre-push] - entry: uv run --extra=dev doccmd --no-write-to-file --language=python --command="pyright" - language: python - types_or: [markdown, rst] - - - id: pyright-verifytypes - name: pyright-verifytypes - stages: [pre-push] - entry: uv run --extra=dev -m pyright --verifytypes mock_vws - language: python - pass_filenames: false - types_or: [python] - additional_dependencies: - - *uv_version - - - id: ty - name: ty - stages: [pre-push] - entry: uv run --extra=dev ty check - language: python - types_or: [python, toml] - pass_filenames: false - additional_dependencies: - - *uv_version - - - id: ty-docs - name: ty-docs - stages: [pre-push] - entry: uv run --extra=dev doccmd --no-write-to-file --language=python --command="ty - check" - language: python - types_or: [markdown, rst] - additional_dependencies: - - *uv_version - - - id: vulture - name: vulture - entry: uv run --extra=dev -m vulture . - language: python - types_or: [python] - pass_filenames: false - additional_dependencies: - - *uv_version - stages: [pre-commit] - - - id: vulture-docs - name: vulture docs - entry: uv run --extra=dev doccmd --no-write-to-file --language=python --command="vulture" - language: python - types_or: [python] - pass_filenames: false - additional_dependencies: - - *uv_version - stages: [pre-commit] - - - id: pyroma - name: pyroma - entry: uv run --extra=dev -m pyroma --min 10 . - language: python - pass_filenames: false - types_or: [toml] - additional_dependencies: - - *uv_version - stages: [pre-commit] - - - id: deptry - name: deptry - entry: uv run --extra=dev -m deptry src/ - language: python - pass_filenames: false - additional_dependencies: - - *uv_version - stages: [pre-commit] - - - id: pylint - name: pylint - entry: uv run --extra=dev -m pylint *.py src/ tests/ docs/ ci/ admin/ - language: python - stages: [manual] - pass_filenames: false - additional_dependencies: - - *uv_version - - - id: pylint-docs - name: pylint-docs - entry: uv run --extra=dev doccmd --no-write-to-file --language=python --command="pylint" - language: python - stages: [manual] - types_or: [markdown, rst] - - - id: ruff-check-fix - name: Ruff check fix - entry: uv run --extra=dev -m ruff check --fix - language: python - types_or: [python] - additional_dependencies: - - *uv_version - stages: [pre-commit] - - - id: ruff-check-fix-docs - name: Ruff check fix docs - entry: uv run --extra=dev doccmd --language=python --command="ruff check --fix" - language: python - types_or: [markdown, rst] - additional_dependencies: - - *uv_version - stages: [pre-commit] - - - id: ruff-format-fix - name: Ruff format - entry: uv run --extra=dev -m ruff format - language: python - types_or: [python] - additional_dependencies: - - *uv_version - stages: [pre-commit] - - - id: ruff-format-fix-docs - name: Ruff format docs - entry: uv run --extra=dev doccmd --language=python --no-pad-file --command="ruff - format" - language: python - types_or: [markdown, rst] - additional_dependencies: - - *uv_version - stages: [pre-commit] - - - id: strict-kwargs-fix - name: strict-kwargs - entry: uv run --extra=dev strict-kwargs check --fix - language: python - types_or: [python] - additional_dependencies: - - *uv_version - stages: [pre-commit] - require_serial: true - - - id: no-defaults - name: no-defaults - entry: uv run --extra=dev no-defaults - language: python - types_or: [python] - additional_dependencies: - - *uv_version - stages: [pre-commit] - require_serial: true - - # Vale enforces prose style rules, such as banning em dashes, in - # reStructuredText and Markdown files. - # The rules come from the ``ai-tells`` package pinned in ``.vale.ini``, - # which ``vale sync`` downloads into the (gitignored) ``styles`` - # directory. - # Vale needs ``rst2html`` from Docutils on the ``PATH`` to parse - # reStructuredText. - # ``vale sync`` also runs when ``.vale.ini`` changes, so a package - # bump takes effect without waiting for the next reStructuredText - # change. - - id: vale-sync - name: vale sync - entry: uv run --extra=dev vale sync - language: python - pass_filenames: false - files: (\.(rst|md)$|^\.vale\.ini$) - additional_dependencies: - - *uv_version - stages: [pre-commit] - - - id: vale - name: vale - entry: uv run --extra=dev vale - language: python - types_or: [rst, markdown] - require_serial: true - additional_dependencies: - - *uv_version - stages: [pre-commit] - - - id: doc8 - name: doc8 - entry: uv run --extra=dev -m doc8 - language: python - types_or: [rst] - additional_dependencies: - - *uv_version - stages: [pre-commit] - - - id: interrogate - name: interrogate - entry: uv run --extra=dev -m interrogate - language: python - types_or: [python] - exclude_types: [executable] - stages: [pre-commit] - - - id: interrogate-docs - name: interrogate docs - entry: uv run --extra=dev doccmd --no-write-to-file --language=python --command="interrogate" - language: python - types_or: [markdown, rst] - additional_dependencies: - - *uv_version - stages: [pre-commit] - - - id: pyproject-fmt-fix - name: pyproject-fmt - entry: uv run --extra=dev pyproject-fmt - language: python - types_or: [toml] - files: pyproject.toml - - stages: [pre-commit] - - id: linkcheck - name: linkcheck - entry: uv run --extra=dev sphinx-build -M linkcheck docs/source docs/build - -W - language: python - types_or: [rst] - stages: [manual] - pass_filenames: false - additional_dependencies: - - *uv_version - - - id: spelling - name: spelling - entry: uv run --extra=dev sphinx-build -M spelling docs/source docs/build - -W - language: python - types_or: [rst] - stages: [manual] - pass_filenames: false - additional_dependencies: - - *uv_version - - - id: docs - name: Build Documentation - entry: uv run --extra=dev sphinx-build -M html docs/source docs/build -W - language: python - stages: [manual] - pass_filenames: false - additional_dependencies: - - *uv_version - - - id: yamlfix - name: yamlfix - entry: uv run --extra=dev yamlfix - language: python - types_or: [yaml] - additional_dependencies: - - *uv_version - stages: [pre-commit] - - - id: zizmor - name: zizmor - entry: uv run --extra=dev zizmor --strict-collection .github - language: python - pass_filenames: false - types_or: [yaml] - additional_dependencies: - - *uv_version - stages: [pre-commit] - - - id: sphinx-lint - name: sphinx-lint - entry: uv run --extra=dev sphinx-lint --enable=all --disable=line-too-long - language: python - types_or: [rst] - additional_dependencies: - - *uv_version - stages: [pre-commit] - - - id: pyrefly - name: pyrefly - stages: [pre-push] - entry: uv run --extra=dev pyrefly check - language: python - types_or: [python, toml] - pass_filenames: false - additional_dependencies: - - *uv_version - - - id: pyrefly-docs - name: pyrefly-docs - stages: [pre-push] - entry: uv run --extra=dev doccmd --no-write-to-file --language=python --command="pyrefly - check" - language: python - types_or: [markdown, rst] - additional_dependencies: - - *uv_version - - - id: hclfmt - name: hclfmt - entry: hclfmt -w - language: golang - types: [hcl] - additional_dependencies: [github.com/hashicorp/hcl/v2/cmd/hclfmt@v2.24.0] - stages: [pre-commit] diff --git a/prek.toml b/prek.toml new file mode 100644 index 000000000..771bb2f39 --- /dev/null +++ b/prek.toml @@ -0,0 +1,554 @@ +# Configuration file for `prek`, a git hook framework written in Rust. +# See https://prek.j178.dev for more information. +#:schema https://www.schemastore.org/prek.json + +fail_fast = true +default_install_hook_types = [ + "pre-commit", + "pre-push" + ] + +[[repos]] +repo = "meta" +hooks = [ + { + id = "check-useless-excludes", + stages = ["pre-commit"] + } +] + +[[repos]] +repo = "https://github.com/pre-commit/pre-commit-hooks" +rev = "v6.0.0" +hooks = [ + { + id = "check-added-large-files", + stages = ["pre-commit"] + }, + { + id = "check-case-conflict", + stages = ["pre-commit"] + }, + { + id = "check-executables-have-shebangs", + stages = ["pre-commit"] + }, + { + id = "check-merge-conflict", + stages = ["pre-commit"] + }, + { + id = "check-shebang-scripts-are-executable", + stages = ["pre-commit"] + }, + { + id = "check-symlinks", + stages = ["pre-commit"] + }, + { + id = "check-json", + stages = ["pre-commit"] + }, + { + id = "check-toml", + stages = ["pre-commit"] + }, + { + id = "check-vcs-permalinks", + stages = ["pre-commit"] + }, + { + id = "check-yaml", + stages = ["pre-commit"] + }, + { + id = "end-of-file-fixer", + stages = ["pre-commit"] + }, + { + id = "file-contents-sorter", + files = 'spelling_private_dict\.txt$', + stages = ["pre-commit"] + }, + { + id = "trailing-whitespace", + stages = ["pre-commit"] + } +] + +[[repos]] +repo = "https://github.com/pre-commit/pygrep-hooks" +rev = "v1.10.0" +hooks = [ + { + id = "rst-directive-colons", + stages = ["pre-commit"] + }, + { + id = "rst-inline-touching-normal", + stages = ["pre-commit"] + }, + { + id = "text-unicode-replacement-char", + stages = ["pre-commit"] + }, + { + id = "rst-backticks", + stages = ["pre-commit"] + } +] + +[[repos]] +repo = "https://github.com/AleksaC/hadolint-py" +rev = "v2.15.1" +hooks = [ + { + id = "hadolint", + stages = ["pre-commit"] + } +] + +[[repos]] +repo = "local" +hooks = [ + { + id = "pytest-check-partition", + name = "pytest-check-partition", + entry = '''bash -c 'uv run --extra=dev python -c "import json, yaml; print(json.dumps(yaml.safe_load(open(\".github/workflows/test.yml\"))))" | jq -r '\''.jobs["ci-tests"].strategy.matrix.ci_pattern[]'\'' | uv run --extra=dev pytest-check-partition --patterns-stdin --disable-plugin pytest-retry --disable-plugin pytest_beartype_tests --extra-arg=--disable-warnings'''', + stages = ["pre-push"], + language = "python", + types_or = [ + "yaml", + "python" + ], + pass_filenames = false, + additional_dependencies = ["uv==0.11.7"] + }, + { + id = "actionlint", + name = "actionlint", + entry = "uv run --extra=dev actionlint", + language = "python", + pass_filenames = false, + types_or = ["yaml"], + additional_dependencies = ["uv==0.11.7"], + stages = ["pre-commit"] + }, + { + id = "pydocstringformatter", + name = "pydocstringformatter", + entry = "uv run --extra=dev pydocstringformatter", + language = "python", + types_or = ["python"], + additional_dependencies = ["uv==0.11.7"], + stages = ["pre-commit"] + }, + { + id = "shellcheck", + name = "shellcheck", + entry = "uv run --extra=dev shellcheck --shell=bash", + language = "python", + types_or = ["shell"], + additional_dependencies = ["uv==0.11.7"], + stages = ["pre-commit"] + }, + { + id = "shellcheck-docs", + name = "shellcheck-docs", + entry = 'uv run --extra=dev doccmd --no-write-to-file --language=shell --language=console --command="shellcheck --shell=bash --exclude=SC2215"', + language = "python", + types_or = [ + "markdown", + "rst" + ], + additional_dependencies = ["uv==0.11.7"], + stages = ["pre-commit"] + }, + { + id = "shfmt", + name = "shfmt", + entry = "uv run --extra=dev shfmt --write --space-redirects --indent=4", + language = "python", + types_or = ["shell"], + additional_dependencies = ["uv==0.11.7"], + stages = ["pre-commit"] + }, + { + id = "shfmt-docs", + name = "shfmt-docs", + entry = 'uv run --extra=dev doccmd --language=shell --language=console --skip-marker=shfmt --no-pad-file --command="shfmt --write --space-redirects --indent=4"', + language = "python", + types_or = [ + "markdown", + "rst" + ], + additional_dependencies = ["uv==0.11.7"], + stages = ["pre-commit"] + }, + { + id = "mypy", + name = "mypy", + stages = ["pre-push"], + entry = "uv run --extra=dev -m mypy --num-workers=4", + language = "python", + types_or = [ + "python", + "toml" + ], + pass_filenames = false, + additional_dependencies = ["uv==0.11.7"] + }, + { + id = "mypy-docs", + name = "mypy-docs", + stages = ["pre-push"], + entry = 'uv run --extra=dev doccmd --no-write-to-file --language=python --command="mypy --num-workers=4"', + language = "python", + types_or = [ + "markdown", + "rst" + ] + }, + { + id = "check-manifest", + name = "check-manifest", + stages = ["pre-push"], + entry = "uv run --extra=dev -m check_manifest", + language = "python", + pass_filenames = false, + additional_dependencies = ["uv==0.11.7"] + }, + { + id = "pyright", + name = "pyright", + stages = ["pre-push"], + entry = "uv run --extra=dev -m pyright .", + language = "python", + types_or = [ + "python", + "toml" + ], + pass_filenames = false, + additional_dependencies = ["uv==0.11.7"] + }, + { + id = "pyright-docs", + name = "pyright-docs", + stages = ["pre-push"], + entry = 'uv run --extra=dev doccmd --no-write-to-file --language=python --command="pyright"', + language = "python", + types_or = [ + "markdown", + "rst" + ] + }, + { + id = "pyright-verifytypes", + name = "pyright-verifytypes", + stages = ["pre-push"], + entry = "uv run --extra=dev -m pyright --verifytypes mock_vws", + language = "python", + pass_filenames = false, + types_or = ["python"], + additional_dependencies = ["uv==0.11.7"] + }, + { + id = "ty", + name = "ty", + stages = ["pre-push"], + entry = "uv run --extra=dev ty check", + language = "python", + types_or = [ + "python", + "toml" + ], + pass_filenames = false, + additional_dependencies = ["uv==0.11.7"] + }, + { + id = "ty-docs", + name = "ty-docs", + stages = ["pre-push"], + entry = 'uv run --extra=dev doccmd --no-write-to-file --language=python --command="ty check"', + language = "python", + types_or = [ + "markdown", + "rst" + ], + additional_dependencies = ["uv==0.11.7"] + }, + { + id = "vulture", + name = "vulture", + entry = "uv run --extra=dev -m vulture .", + language = "python", + types_or = ["python"], + pass_filenames = false, + additional_dependencies = ["uv==0.11.7"], + stages = ["pre-commit"] + }, + { + id = "vulture-docs", + name = "vulture docs", + entry = 'uv run --extra=dev doccmd --no-write-to-file --language=python --command="vulture"', + language = "python", + types_or = ["python"], + pass_filenames = false, + additional_dependencies = ["uv==0.11.7"], + stages = ["pre-commit"] + }, + { + id = "pyroma", + name = "pyroma", + entry = "uv run --extra=dev -m pyroma --min 10 .", + language = "python", + pass_filenames = false, + types_or = ["toml"], + additional_dependencies = ["uv==0.11.7"], + stages = ["pre-commit"] + }, + { + id = "deptry", + name = "deptry", + entry = "uv run --extra=dev -m deptry src/", + language = "python", + pass_filenames = false, + additional_dependencies = ["uv==0.11.7"], + stages = ["pre-commit"] + }, + { + id = "pylint", + name = "pylint", + entry = "uv run --extra=dev -m pylint *.py src/ tests/ docs/ ci/ admin/", + language = "python", + stages = ["manual"], + pass_filenames = false, + additional_dependencies = ["uv==0.11.7"] + }, + { + id = "pylint-docs", + name = "pylint-docs", + entry = 'uv run --extra=dev doccmd --no-write-to-file --language=python --command="pylint"', + language = "python", + stages = ["manual"], + types_or = [ + "markdown", + "rst" + ] + }, + { + id = "ruff-check-fix", + name = "Ruff check fix", + entry = "uv run --extra=dev -m ruff check --fix", + language = "python", + types_or = ["python"], + additional_dependencies = ["uv==0.11.7"], + stages = ["pre-commit"] + }, + { + id = "ruff-check-fix-docs", + name = "Ruff check fix docs", + entry = 'uv run --extra=dev doccmd --language=python --command="ruff check --fix"', + language = "python", + types_or = [ + "markdown", + "rst" + ], + additional_dependencies = ["uv==0.11.7"], + stages = ["pre-commit"] + }, + { + id = "ruff-format-fix", + name = "Ruff format", + entry = "uv run --extra=dev -m ruff format", + language = "python", + types_or = ["python"], + additional_dependencies = ["uv==0.11.7"], + stages = ["pre-commit"] + }, + { + id = "ruff-format-fix-docs", + name = "Ruff format docs", + entry = 'uv run --extra=dev doccmd --language=python --no-pad-file --command="ruff format"', + language = "python", + types_or = [ + "markdown", + "rst" + ], + additional_dependencies = ["uv==0.11.7"], + stages = ["pre-commit"] + }, + { + id = "strict-kwargs-fix", + name = "strict-kwargs", + entry = "uv run --extra=dev strict-kwargs check --fix", + language = "python", + types_or = ["python"], + additional_dependencies = ["uv==0.11.7"], + stages = ["pre-commit"], + require_serial = true + }, + { + id = "no-defaults", + name = "no-defaults", + entry = "uv run --extra=dev no-defaults", + language = "python", + types_or = ["python"], + additional_dependencies = ["uv==0.11.7"], + stages = ["pre-commit"], + require_serial = true + }, + { + id = "vale-sync", + name = "vale sync", + entry = "uv run --extra=dev vale sync", + language = "python", + pass_filenames = false, + files = '(\.(rst|md)$|^\.vale\.ini$)', + additional_dependencies = ["uv==0.11.7"], + stages = ["pre-commit"] + }, + { + id = "vale", + name = "vale", + entry = "uv run --extra=dev vale", + language = "python", + types_or = [ + "rst", + "markdown" + ], + require_serial = true, + additional_dependencies = ["uv==0.11.7"], + stages = ["pre-commit"] + }, + { + id = "doc8", + name = "doc8", + entry = "uv run --extra=dev -m doc8", + language = "python", + types_or = ["rst"], + additional_dependencies = ["uv==0.11.7"], + stages = ["pre-commit"] + }, + { + id = "interrogate", + name = "interrogate", + entry = "uv run --extra=dev -m interrogate", + language = "python", + types_or = ["python"], + exclude_types = ["executable"], + stages = ["pre-commit"] + }, + { + id = "interrogate-docs", + name = "interrogate docs", + entry = 'uv run --extra=dev doccmd --no-write-to-file --language=python --command="interrogate"', + language = "python", + types_or = [ + "markdown", + "rst" + ], + additional_dependencies = ["uv==0.11.7"], + stages = ["pre-commit"] + }, + { + id = "pyproject-fmt-fix", + name = "pyproject-fmt", + entry = "uv run --extra=dev pyproject-fmt", + language = "python", + types_or = ["toml"], + files = "pyproject.toml", + stages = ["pre-commit"] + }, + { + id = "linkcheck", + name = "linkcheck", + entry = "uv run --extra=dev sphinx-build -M linkcheck docs/source docs/build -W", + language = "python", + types_or = ["rst"], + stages = ["manual"], + pass_filenames = false, + additional_dependencies = ["uv==0.11.7"] + }, + { + id = "spelling", + name = "spelling", + entry = "uv run --extra=dev sphinx-build -M spelling docs/source docs/build -W", + language = "python", + types_or = ["rst"], + stages = ["manual"], + pass_filenames = false, + additional_dependencies = ["uv==0.11.7"] + }, + { + id = "docs", + name = "Build Documentation", + entry = "uv run --extra=dev sphinx-build -M html docs/source docs/build -W", + language = "python", + stages = ["manual"], + pass_filenames = false, + additional_dependencies = ["uv==0.11.7"] + }, + { + id = "yamlfix", + name = "yamlfix", + entry = "uv run --extra=dev yamlfix", + language = "python", + types_or = ["yaml"], + additional_dependencies = ["uv==0.11.7"], + stages = ["pre-commit"] + }, + { + id = "zizmor", + name = "zizmor", + entry = "uv run --extra=dev zizmor --strict-collection .github", + language = "python", + pass_filenames = false, + types_or = ["yaml"], + additional_dependencies = ["uv==0.11.7"], + stages = ["pre-commit"] + }, + { + id = "sphinx-lint", + name = "sphinx-lint", + entry = "uv run --extra=dev sphinx-lint --enable=all --disable=line-too-long", + language = "python", + types_or = ["rst"], + additional_dependencies = ["uv==0.11.7"], + stages = ["pre-commit"] + }, + { + id = "pyrefly", + name = "pyrefly", + stages = ["pre-push"], + entry = "uv run --extra=dev pyrefly check", + language = "python", + types_or = [ + "python", + "toml" + ], + pass_filenames = false, + additional_dependencies = ["uv==0.11.7"] + }, + { + id = "pyrefly-docs", + name = "pyrefly-docs", + stages = ["pre-push"], + entry = 'uv run --extra=dev doccmd --no-write-to-file --language=python --command="pyrefly check"', + language = "python", + types_or = [ + "markdown", + "rst" + ], + additional_dependencies = ["uv==0.11.7"] + }, + { + id = "hclfmt", + name = "hclfmt", + entry = "hclfmt -w", + language = "golang", + types = ["hcl"], + additional_dependencies = ["github.com/hashicorp/hcl/v2/cmd/hclfmt@v2.24.0"], + stages = ["pre-commit"] + } +]