ci: autofix_prs: true autoupdate_schedule: weekly submodules: false # pip-compile requires internet, regenerate-files may get cache # issues in CI, so they're run in check.sh skip: [pip-compile, regenerate-files] repos: - repo: https://github.com/pre-commit/pre-commit-hooks rev: v6.0.0 hooks: - id: trailing-whitespace - id: end-of-file-fixer - id: check-yaml - id: check-toml - id: check-merge-conflict - id: mixed-line-ending - id: check-case-conflict - id: sort-simple-yaml files: .pre-commit-config.yaml - repo: https://github.com/psf/black-pre-commit-mirror rev: 26.5.1 hooks: - id: black - repo: https://github.com/astral-sh/ruff-pre-commit rev: v0.16.2 hooks: - id: ruff-check types: [file] types_or: [python, pyi, toml] args: ["--show-fixes"] - repo: https://github.com/codespell-project/codespell rev: v2.4.3 hooks: - id: codespell additional_dependencies: # tomli needed on 3.10. tomllib is available in stdlib on 3.11+ - tomli - repo: https://github.com/adhtruong/mirrors-typos rev: v1.49.0 hooks: - id: typos - repo: https://github.com/sphinx-contrib/sphinx-lint rev: v1.0.2 hooks: - id: sphinx-lint - repo: local hooks: - id: regenerate-files name: regenerate generated files language: python entry: python src/trio/_tools/gen_exports.py pass_filenames: false additional_dependencies: ["astor", "attrs", "black", "ruff>=0.15.22"] files: ^src\/trio\/_core\/(_run|(_i(o_(common|epoll|kqueue|windows)|nstrumentation)))\.py$ - id: regenerate-windows-cffi name: regenerate windows CFFI language: python entry: python src/trio/_tools/windows_ffi_build.py pass_filenames: false additional_dependencies: ["cffi"] files: ^src\/trio\/_tools\/windows_ffi_build\.py$ - id: sync-test-requirements name: synchronize test requirements language: python entry: python src/trio/_tools/sync_requirements.py pass_filenames: false additional_dependencies: ["pyyaml"] files: ^(test-requirements\.txt)|(\.pre-commit-config\.yaml)$ - repo: https://github.com/astral-sh/uv-pre-commit rev: 0.12.3 hooks: # Compile requirements - id: pip-compile name: uv pip-compile test-requirements.in args: [ "--universal", "--python-version=3.10", "test-requirements.in", "-o", "test-requirements.txt"] files: ^test-requirements\.(in|txt)$ - id: pip-compile name: uv pip-compile docs-requirements.in args: [ "--universal", "--python-version=3.11", "docs-requirements.in", "-o", "docs-requirements.txt"] files: ^docs-requirements\.(in|txt)$