repos: - repo: local hooks: - id: ruff-check name: Ruff Linter language: system types: [python] entry: python3 -m ruff check --fix require_serial: true stages: [pre-commit, pre-push, manual] - id: ruff-format name: Ruff Formatter language: system types: [python] entry: python3 -m ruff format require_serial: true stages: [pre-commit, pre-push, manual] - id: check-ast name: Check Python AST language: system types: [python] entry: check-ast - id: check-case-conflict name: Check for case conflicts language: system entry: check-case-conflict - id: check-docstring-first name: heck docstring is first language: system types: [python] entry: check-docstring-first - id: check-executables-have-shebangs name: Check that executables have shebangs language: system types: [text, executable] entry: check-executables-have-shebangs stages: [pre-commit, pre-push, manual] - id: check-json name: Check JSON files language: system types: [json] entry: check-json - id: check-merge-conflict name: Check for merge conflicts language: system types: [text] entry: check-merge-conflict - id: check-toml name: Check TOML files language: system types: [toml] entry: check-toml - id: codespell name: Check code for common misspellings language: system types: [text] entry: codespell exclude: voice_data.py - id: detect-private-key name: Detect Private Keys language: system types: [text] entry: detect-private-key - id: end-of-file-fixer name: Fix End of Files language: system types: [text] entry: end-of-file-fixer stages: [pre-commit, pre-push, manual] - id: no-commit-to-branch name: Don't commit to the main branch language: system entry: no-commit-to-branch pass_filenames: false always_run: true args: - --branch=main - id: pylint name: Starring code with pylint entry: python3 -m pylint language: system types: [python] require_serial: true files: ^hass_nabucasa/.+\.py$ - id: trailing-whitespace name: Trim Trailing Whitespace language: system types: [text] exclude: __snapshots__ entry: trailing-whitespace-fixer stages: [pre-commit, pre-push, manual] - id: mypy name: mypy entry: python3 -m mypy language: system types: [python] require_serial: true files: ^hass_nabucasa/.+\.py$