Formatting checks

This commit is contained in:
blazickjp
2025-04-10 19:51:09 -07:00
parent 4517ab7679
commit c5ffd07893
2 changed files with 33 additions and 0 deletions

27
.github/workflows/lint.yml vendored Normal file
View File

@@ -0,0 +1,27 @@
name: Lint
on:
push:
branches: [ main, master ]
pull_request:
branches: [ main, master ]
types: [opened, synchronize, reopened]
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install dependencies
run: |
pip install black
- name: Check code formatting with Black
run: |
black --check .

6
.pre-commit-config.yaml Normal file
View File

@@ -0,0 +1,6 @@
repos:
- repo: https://github.com/psf/black
rev: 23.3.0
hooks:
- id: black
language_version: python3.11