Skip to content

Update pyproject.toml #18

Update pyproject.toml

Update pyproject.toml #18

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.")