-
Notifications
You must be signed in to change notification settings - Fork 29
34 lines (34 loc) · 1.13 KB
/
Copy pathlinters.yml
File metadata and controls
34 lines (34 loc) · 1.13 KB
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
name: Code Formatter
"on": push
jobs:
PEP8:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup Python
uses: actions/setup-python@v1
with:
python-version: 3.9
- name: Install Python lint libraries
run: |
pip install autopep8 autoflake isort black
- name: Check for showstoppers
run: >
autopep8 --verbose --in-place --recursive --aggressive --aggressive
--ignore=W605 .
- name: Remove unused imports and variables
run: >
autoflake --in-place --recursive --remove-all-unused-imports
--remove-unused-variables --ignore-init-module-imports .
- name: lint with isort and black
run: |
isort .
black .
- uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: "auto: black code format"
commit_options: "--no-verify"
repository: .
commit_user_name: code-rgb
commit_user_email: 62891774+code-rgb@users.noreply.github.com
commit_author: code-rgb <62891774+code-rgb@users.noreply.github.com>