Skip to content

Updated workflow

Updated workflow #7

Workflow file for this run

name: Auto-format with Black and isort
on:
push:
branches:
- main
- patch
- dev # Add additional branches here as needed
pull_request:
branches:
- main
- patch
- dev # Ensure formatting is applied for PRs targeting these branches
jobs:
autoformat:
name: Auto-format Code with Black and isort
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Install Black and isort
run: |
python -m pip install --upgrade pip
pip install black isort
- name: Run isort
run: isort .
- name: Run Black Formatter
run: black --line-length 119 .