-repos:
- - repo: local
- hooks:
- - id: ruff-check
- name: 🐶 Ruff Linter
- language: system
- types: [python]
- entry: scripts/run-in-env.sh ruff check --fix
- require_serial: true
- stages: [pre-commit, pre-push, manual]
- - id: ruff-format
- name: 🐶 Ruff Formatter
- language: system
- types: [python]
- entry: scripts/run-in-env.sh ruff format
- require_serial: true
- stages: [pre-commit, pre-push, manual]
- - id: check-ast
- name: 🐍 Check Python AST
- language: system
- types: [python]
- entry: scripts/run-in-env.sh check-ast
- - id: check-case-conflict
- name: 🔠 Check for case conflicts
- language: system
- entry: scripts/run-in-env.sh check-case-conflict
- - id: check-docstring-first
- name: ℹ️ Check docstring is first
- language: system
- types: [python]
- entry: scripts/run-in-env.sh check-docstring-first
- - id: check-executables-have-shebangs
- name: 🧐 Check that executables have shebangs
- language: system
- types: [text, executable]
- entry: scripts/run-in-env.sh check-executables-have-shebangs
- stages: [pre-commit, pre-push, manual]
- - id: check-json
- name: { Check JSON files
- language: system
- types: [json]
- entry: scripts/run-in-env.sh check-json
- files: ^(music_assistant/.+/manifest\.json)|(tests/providers/.+/fixtures/.+\.json)$
- - id: check-merge-conflict
- name: 💥 Check for merge conflicts
- language: system
- types: [text]
- entry: scripts/run-in-env.sh check-merge-conflict
- - id: check-symlinks
- name: 🔗 Check for broken symlinks
- language: system
- types: [symlink]
- entry: scripts/run-in-env.sh check-symlinks
- - id: check-toml
- name: ✅ Check TOML files
- language: system
- types: [toml]
- entry: scripts/run-in-env.sh check-toml
- - id: codespell
- name: ✅ Check code for common misspellings
- language: system
- types: [text]
- entry: scripts/run-in-env.sh codespell
- - id: detect-private-key
- name: 🕵️ Detect Private Keys
- language: system
- types: [text]
- entry: scripts/run-in-env.sh detect-private-key
- - id: end-of-file-fixer
- name: ⮐ Fix End of Files
- language: system
- types: [text]
- entry: scripts/run-in-env.sh end-of-file-fixer
- stages: [pre-commit, pre-push, manual]
- - id: no-commit-to-branch
- name: 🛑 Don't commit to stable branch
- language: system
- entry: scripts/run-in-env.sh no-commit-to-branch
- pass_filenames: false
- always_run: true
- args:
- - --branch=stable
- - id: trailing-whitespace
- name: ✄ Trim Trailing Whitespace
- language: system
- types: [text]
- entry: scripts/run-in-env.sh trailing-whitespace-fixer
- stages: [pre-commit, pre-push, manual]
- - id: mypy
- name: mypy
- entry: scripts/run-in-env.sh mypy
- language: script
- types: [python]
- require_serial: true
- pass_filenames: false
- - id: gen_requirements_all
- name: gen_requirements_all
- entry: scripts/run-in-env.sh python3 -m scripts.gen_requirements_all
- pass_filenames: false
- language: script
- types: [text]
- files: ^(music_assistant/.+/manifest\.json|pyproject\.toml|\.pre-commit-config\.yaml|scripts/gen_requirements_all\.py)$
+repos:\r
+ - repo: local\r
+ hooks:\r
+ # gen_requirements_all modifies files so it has to be first\r
+ - id: gen_requirements_all\r
+ name: gen_requirements_all\r
+ entry: uv run -m scripts.gen_requirements_all\r
+ pass_filenames: false\r
+ language: system\r
+ types: [text]\r
+ files: ^(music_assistant/.+/manifest\.json|pyproject\.toml|\.pre-commit-config\.yaml|scripts/gen_requirements_all\.py)$\r
+\r
+ - id: ruff-check\r
+ name: 🐶 Ruff Linter\r
+ language: system\r
+ types: [python]\r
+ entry: uv run ruff check --fix\r
+ require_serial: true\r
+ stages: [pre-commit, pre-push, manual]\r
+\r
+ - id: ruff-format\r
+ name: 🐶 Ruff Formatter\r
+ language: system\r
+ types: [python]\r
+ entry: uv run ruff format\r
+ require_serial: true\r
+ stages: [pre-commit, pre-push, manual]\r
+\r
+ - id: check-ast\r
+ name: 🐍 Check Python AST\r
+ language: system\r
+ types: [python]\r
+ entry: uv run check-ast\r
+\r
+ - id: check-case-conflict\r
+ name: 🔠 Check for case conflicts\r
+ language: system\r
+ entry: uv run check-case-conflict\r
+\r
+ - id: check-docstring-first\r
+ name: ℹ️ Check docstring is first\r
+ language: system\r
+ types: [python]\r
+ entry: uv run check-docstring-first\r
+\r
+ - id: check-executables-have-shebangs\r
+ name: 🧐 Check that executables have shebangs\r
+ language: system\r
+ types: [text, executable]\r
+ entry: uv run check-executables-have-shebangs\r
+ stages: [pre-commit, pre-push, manual]\r
+\r
+ - id: check-json\r
+ name: { Check JSON files\r
+ language: system\r
+ types: [json]\r
+ entry: uv run check-json\r
+ files: ^(music_assistant/.+/manifest\.json)|(tests/providers/.+/fixtures/.+\.json)$\r
+\r
+ - id: check-merge-conflict\r
+ name: 💥 Check for merge conflicts\r
+ language: system\r
+ types: [text]\r
+ entry: uv run check-merge-conflict\r
+\r
+ - id: check-symlinks\r
+ name: 🔗 Check for broken symlinks\r
+ language: system\r
+ types: [symlink]\r
+ entry: uv run check-symlinks\r
+\r
+ - id: check-toml\r
+ name: ✅ Check TOML files\r
+ language: system\r
+ types: [toml]\r
+ entry: uv run check-toml\r
+\r
+ - id: codespell\r
+ name: ✅ Check code for common misspellings\r
+ language: system\r
+ types: [text]\r
+ entry: uv run codespell\r
+\r
+ - id: detect-private-key\r
+ name: 🕵️ Detect Private Keys\r
+ language: system\r
+ types: [text]\r
+ entry: uv run detect-private-key\r
+\r
+ - id: end-of-file-fixer\r
+ name: ⮐ Fix End of Files\r
+ language: system\r
+ types: [text]\r
+ entry: uv run end-of-file-fixer\r
+ stages: [pre-commit, pre-push, manual]\r
+\r
+ - id: no-commit-to-branch\r
+ name: 🛑 Don't commit to stable branch\r
+ language: system\r
+ entry: uv run no-commit-to-branch\r
+ pass_filenames: false\r
+ always_run: true\r
+ args:\r
+ - --branch=stable\r
+\r
+ - id: trailing-whitespace\r
+ name: ✄ Trim Trailing Whitespace\r
+ language: system\r
+ types: [text]\r
+ entry: uv run trailing-whitespace-fixer\r
+ stages: [pre-commit, pre-push, manual]\r
+\r
+ - id: mypy\r
+ name: mypy\r
+ entry: uv run mypy\r
+ language: system\r
+ types: [python]\r
+ require_serial: true\r
+ pass_filenames: false\r