Added pre-commit

This commit is contained in:
Donkie
2023-05-28 23:10:36 +02:00
parent 235236d435
commit 27731974fd
11 changed files with 39 additions and 10 deletions

View File

@@ -8,6 +8,16 @@ on:
- master
jobs:
style:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: "3.9"
- run: pip install pre-commit==3.3.2
- run: pre-commit run --all-files
build:
runs-on: ubuntu-latest
steps:

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

@@ -0,0 +1,18 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.3.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-added-large-files
- id: check-case-conflict
- id: check-merge-conflict
- repo: https://github.com/psf/black
rev: 23.3.0
hooks:
- id: black
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.0.270
hooks:
- id: ruff

View File

@@ -1,2 +1,3 @@
ruff
black
ruff==0.0.270
black==23.3.0
pre-commit==3.3.2