Skip to content

Commit

Permalink
enforced auto black linting
Browse files Browse the repository at this point in the history
  • Loading branch information
FinnConnor committed Sep 10, 2024
1 parent f52c6ac commit 61ad15e
Show file tree
Hide file tree
Showing 3 changed files with 181 additions and 92 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Pre-commit checks

on: [push, pull_request] # Runs on push or pull request events

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

steps:
- name: Checkout the code
uses: actions/checkout@v3 # Check out the code from the repository

- name: Set up Python
uses: actions/setup-python@v4 # Set up Python environment
with:
python-version: '3.x' # Set to your required Python version (e.g., '3.9')

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pre-commit black
- name: Run pre-commit hooks
run: pre-commit run --all-files # Run pre-commit on all files

- name: Auto-format code with Black
run: black .

Loading

0 comments on commit 61ad15e

Please sign in to comment.