Add pre-commit: black+flake8+pylint
Browse files- .github/workflows/pre-commit.yml +16 -0
- .pre-commit-config.yaml +19 -0
- requirements-dev.txt +1 -0
.github/workflows/pre-commit.yml
ADDED
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
name: pre-commit
|
2 |
+
|
3 |
+
on:
|
4 |
+
pull_request:
|
5 |
+
push:
|
6 |
+
|
7 |
+
jobs:
|
8 |
+
pre-commit:
|
9 |
+
runs-on: ubuntu-latest
|
10 |
+
steps:
|
11 |
+
- uses: actions/checkout@v3
|
12 |
+
- uses: actions/setup-python@v4
|
13 |
+
with:
|
14 |
+
python-version: "3.9"
|
15 |
+
cache: 'pip' # caching pip dependencies
|
16 |
+
- uses: pre-commit/action@v3.0.0
|
.pre-commit-config.yaml
ADDED
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
repos:
|
2 |
+
- repo: https://github.com/pre-commit/pre-commit-hooks
|
3 |
+
rev: v4.4.0
|
4 |
+
hooks:
|
5 |
+
- id: check-yaml
|
6 |
+
- id: end-of-file-fixer
|
7 |
+
- id: trailing-whitespace
|
8 |
+
- repo: https://github.com/psf/black
|
9 |
+
rev: 23.3.0
|
10 |
+
hooks:
|
11 |
+
- id: black
|
12 |
+
- repo: https://github.com/PyCQA/flake8
|
13 |
+
rev: 6.0.0
|
14 |
+
hooks:
|
15 |
+
- id: flake8
|
16 |
+
- repo: https://github.com/PyCQA/pylint
|
17 |
+
rev: v2.17.4
|
18 |
+
hooks:
|
19 |
+
- id: pylint
|
requirements-dev.txt
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
pre-commit
|