aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Chris Lovering <[email protected]>2024-02-10 11:30:03 +0000
committerGravatar Chris Lovering <[email protected]>2024-02-10 11:30:03 +0000
commit0de787a7f31b692fd6c5c8c7bbc34486f8474219 (patch)
tree18fe6d105d886257d5e94cf69a961644374fa5ea
parentBump cryptography from 41.0.6 to 42.0.0 (#180) (diff)
Make use of ruff format
-rw-r--r--.github/workflows/lint.yaml2
-rw-r--r--.pre-commit-config.yaml14
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