diff options
-rw-r--r-- | .github/workflows/lint.yaml | 2 | ||||
-rw-r--r-- | .pre-commit-config.yaml | 14 |
2 files changed, 12 insertions, 4 deletions
diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml index cc12ce4..ed89fe5 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/lint.yaml @@ -16,7 +16,7 @@ jobs: install_args: --only main - name: Run pre-commit hooks - run: SKIP=ruff pre-commit run --all-files + run: SKIP=ruff-lint pre-commit run --all-files # Run `ruff` using github formatting to enable automatic inline annotations. - name: Run ruff diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 0692efd..8229e8b 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,7 +1,7 @@ exclude: (secrets?\.ya?ml)|(ghcr-pull-secrets\.yaml)$ repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.4.0 + rev: v4.5.0 hooks: - id: check-merge-conflict - id: check-toml @@ -13,11 +13,19 @@ repos: - repo: local hooks: - - id: ruff - name: ruff + - id: ruff-lint + name: ruff linting description: Run ruff linting entry: poetry run ruff check --force-exclude language: system 'types_or': [python, pyi] require_serial: true args: [--fix, --exit-non-zero-on-fix] + + - id: ruff-format + name: ruff formatting + description: Run ruff formatting + entry: poetry run ruff format --force-exclude + language: system + 'types_or': [python, pyi] + require_serial: true |