| 1234567891011121314151617181920212223242526272829303132333435363738 |
- name: PyLint
- on:
- push:
- branches: [ master ]
- workflow_dispatch:
- 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: |
- pip3 install autoflake isort black
- - 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
- run: |
- isort .
- - name: lint with black
- run: |
- black .
- # commit changes
- - uses: stefanzweifel/git-auto-commit-action@v4
- with:
- commit_message: '[AUTO] Code-Format'
- commit_options: '--no-verify'
- repository: .
- commit_user_name: TheHamkerCat
- commit_user_email: thehamkercat@gmail.com
- commit_author: TheHamkerCat <thehamkercat@gmail.com>
|