Spaces:
Paused
Paused
Captain Ezio
commited on
Commit
·
ebbf1e9
1
Parent(s):
fa04dc3
Create pylint.yml
Browse files- .github/workflows/pylint.yml +39 -0
.github/workflows/pylint.yml
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
name: pyLint
|
| 2 |
+
|
| 3 |
+
on:
|
| 4 |
+
push:
|
| 5 |
+
workflow_dispatch:
|
| 6 |
+
|
| 7 |
+
jobs:
|
| 8 |
+
pyLint:
|
| 9 |
+
runs-on: ubuntu-latest
|
| 10 |
+
steps:
|
| 11 |
+
- name: Checkout
|
| 12 |
+
uses: actions/checkout@v2
|
| 13 |
+
- name: Setup Python
|
| 14 |
+
uses: actions/setup-python@v1
|
| 15 |
+
with:
|
| 16 |
+
python-version: 3.9
|
| 17 |
+
- name: Install dependencies
|
| 18 |
+
run: pip install autopep8 autoflake isort black
|
| 19 |
+
- name: "[autopep8] Format fixes"
|
| 20 |
+
run: |
|
| 21 |
+
find -name "*.py" -not -path "./venv/*" -exec autopep8 --verbose --in-place --recursive --aggressive --aggressive '{}' \;
|
| 22 |
+
- name: "[autoflake] Remove unused imports and variables"
|
| 23 |
+
run: |
|
| 24 |
+
find . -regex "^.\/\Main\/\w+\/.+\.py$" -exec autoflake --in-place --recursive --remove-all-unused-imports --remove-unused-variables --ignore-init-module-imports -v -v '{}' \;
|
| 25 |
+
- name: "[black] lint"
|
| 26 |
+
run: |
|
| 27 |
+
black -v .
|
| 28 |
+
- name: "[isort] lint"
|
| 29 |
+
run: |
|
| 30 |
+
isort -v --cs --ca --ls --lss --ds --fss --lai 2 -m 4 .
|
| 31 |
+
- name: Commit Checkout
|
| 32 |
+
uses: stefanzweifel/git-auto-commit-action@v4
|
| 33 |
+
with:
|
| 34 |
+
repository: .
|
| 35 |
+
commit_user_name: Captain Ezio
|
| 36 |
+
commit_user_email: iamgojoof6eyes@gmail.com
|
| 37 |
+
commit_options: '--no-verify'
|
| 38 |
+
commit_message: 'auto'
|
| 39 |
+
commit_author: Captain Ezio <iamgojoof6eyes@gmail.com>
|