Skip to content
This repository has been archived by the owner on Dec 10, 2024. It is now read-only.

Commit

Permalink
CI: explicity execute pre-commit in CI on PRs (#47)
Browse files Browse the repository at this point in the history
* CI: explicity execute pre-commit in CI on PRs

* CI: Fix outstanding pre-commit violations
  • Loading branch information
mawildoer authored Sep 9, 2024
1 parent 6cf4dc7 commit 5644350
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 1 deletion.
25 changes: 25 additions & 0 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: pre-commit

on:
pull_request:
branches:
- '**'

jobs:
run-pre-commit:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.12'

- name: Install pre-commit
run: pip install pre-commit

- name: Run pre-commit
run: pre-commit run --all-files

- name: Fail on diff after pre-commit is run
run: git diff --exit-code
2 changes: 1 addition & 1 deletion src/faebryk/core/node.py
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ def setup_field(name, obj):
raise FieldConstructionError(
self,
name,
f"An exception occurred while constructing field \"{name}\"",
f'An exception occurred while constructing field "{name}"',
) from e

nonrt, rt = partition(lambda x: isinstance(x[1], rt_field), clsfields.items())
Expand Down

0 comments on commit 5644350

Please sign in to comment.