Update inferclass.py #13
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Auto Fix Python Code | |
on: | |
push: | |
branches: | |
- main | |
- 'feature/*' | |
pull_request: | |
branches: | |
- main | |
- 'feature/*' | |
jobs: | |
format: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.8' # Specify the Python version you want to use | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install black flake8 | |
- name: Run Black | |
run: | | |
black . --check --diff || (black . && echo "Code formatted with Black") | |
- name: Run Flake8 | |
run: | | |
flake8 . || (echo "Linting issues found. Please fix them.") |