repos: - repo: https://github.com/psf/black rev: 24.10.0 hooks: - id: black - repo: https://github.com/astral-sh/ruff-pre-commit rev: v0.7.0 hooks: - id: ruff types_or: ["python"] args: ["--fix"] - id: ruff-format files: ^.+\.py$ - repo: https://github.com/codespell-project/codespell rev: v2.3.0 hooks: - id: codespell args: - --quiet-level=2 # assertIn is the unittest method, not a typo of "assertion" - --ignore-words-list=assertIn exclude_types: [csv, json] - repo: https://github.com/pre-commit/pre-commit-hooks rev: v5.0.0 hooks: - id: check-executables-have-shebangs stages: [manual] - repo: https://github.com/cdce8p/python-typing-update rev: v0.7.0 hooks: # Run `python-typing-update` hook manually from time to time # to update python typing syntax. # Will require manual work, before submitting changes! # pre-commit run --hook-stage manual python-typing-update --all-files - id: python-typing-update stages: [manual] args: - --py312-plus - --force - --keep-updates files: ^.+\.py$ - repo: https://github.com/pre-commit/mirrors-prettier rev: v3.0.3 hooks: - id: prettier exclude: ^SUPPORTED_DEVICES\.md$ - repo: "https://github.com/pre-commit/mirrors-mypy" rev: "v1.12.0" hooks: - id: mypy - repo: local hooks: - id: generate-supported-devices name: Generate SUPPORTED_DEVICES.md entry: python scripts/generate_supported_devices.py language: python files: ^(src/govee_local_api/light_capabilities\.py|scripts/generate_supported_devices\.py|SUPPORTED_DEVICES\.md)$ pass_filenames: false