enable Prettier hook to pre-commit for YAML & TOML (#2142)

* add Prettier hook for consistent formatting YAML, and TOML files
* fix(pre_commit): 🎨 auto format pre-commit hooks

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
Jirka Borovec 2026-02-10 21:39:52 +09:00 committed by GitHub
parent e4d0be777d
commit 6f1eb63825
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 31 additions and 25 deletions

View File

@ -34,7 +34,6 @@ coverage:
github_checks:
annotations: false
comment:
layout: header, diff
require_changes: false

View File

@ -68,7 +68,6 @@ jobs:
- name: Minimize uv cache
run: uv cache prune --ci
testing-guardian:
runs-on: ubuntu-latest
needs: run-tests

View File

@ -10,8 +10,8 @@ on:
pull_request:
branches: [main, develop]
paths:
- '.github/workflows/build-package.yml'
- '.github/workflows/publish-pre-release.yml'
- ".github/workflows/build-package.yml"
- ".github/workflows/publish-pre-release.yml"
permissions: {} # Explicitly remove all permissions by default

View File

@ -7,8 +7,8 @@ on:
pull_request:
branches: [main, develop]
paths:
- '.github/workflows/build-package.yml'
- '.github/workflows/publish-release.yml'
- ".github/workflows/build-package.yml"
- ".github/workflows/publish-release.yml"
permissions: {} # Explicitly remove all permissions by default
@ -42,7 +42,7 @@ jobs:
if: github.event_name == 'release'
uses: AButler/upload-release-assets@v3.0
with:
files: 'dist/*'
files: "dist/*"
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: 🚀 Publish to PyPi

View File

@ -5,8 +5,8 @@ on:
pull_request:
branches: [main, develop]
paths:
- '.github/workflows/build-package.yml'
- '.github/workflows/publish-testpypi.yml'
- ".github/workflows/build-package.yml"
- ".github/workflows/publish-testpypi.yml"
permissions: {} # Explicitly remove all permissions by default

View File

@ -21,27 +21,35 @@ repos:
- id: detect-private-key
- id: pretty-format-json
exclude: demo.ipynb
args: ['--autofix', '--no-sort-keys', '--indent=4']
args: ["--autofix", "--no-sort-keys", "--indent=4"]
- id: end-of-file-fixer
- id: mixed-line-ending
- repo: https://github.com/tox-dev/pyproject-fmt
rev: v2.14.2
hooks:
- id: pyproject-fmt
- repo: https://github.com/JoC0de/pre-commit-prettier
rev: v3.8.1 # using tag; previously pinned SHA when tags were not persistent
hooks:
- id: prettier
files: \.(ya?ml|toml)$
# https://prettier.io/docs/en/options.html#print-width
args: ["--print-width=120"]
- repo: https://github.com/abravalheri/validate-pyproject
rev: v0.25
hooks:
- id: validate-pyproject
- repo: https://github.com/tox-dev/pyproject-fmt
rev: v2.14.2
hooks:
- id: pyproject-fmt
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.15.0
hooks:
- id: ruff-check
args: [--fix]
- id: ruff-format
types_or: [ python, pyi, jupyter ]
- repo: https://github.com/abravalheri/validate-pyproject
rev: v0.25
hooks:
- id: validate-pyproject
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.15.0
hooks:
- id: ruff-check
args: [--fix]
- id: ruff-format
types_or: [python, pyi, jupyter]
- repo: https://github.com/executablebooks/mdformat
rev: 1.0.0