-
Notifications
You must be signed in to change notification settings - Fork 6
47 lines (36 loc) · 1.31 KB
/
black.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
name: Black Formatter
on: [pull_request, workflow_dispatch]
permissions:
checks: write
contents: write
jobs:
run-linters:
name: Black Formatting
runs-on: ubuntu-latest
steps:
- name: Check out Git repository
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: 3.9
- name: Install Python dependencies
run: pip install black
- name: Run Black formatting
uses: wearerequired/lint-action@v2
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
black: true
black_dir: "transformato/"
black_args: '--extend-exclude="(bin/*|scripts/*|_version.py)"'
auto_fix: true
# flake8: true
# flake8_dir: "transformato/"
# flake8_args: "--exclude=scripts,bin,_version.py --max-line-length=88 --extend-ignore=E203 --exit-zero"
# - name: Setup flake8 annotations
# uses: rbialon/flake8-annotations@v1
# - name: Lint with flake8
# run: |
# pip install flake8 pep8-naming
# # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
# flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics