/ .github / workflows / lint.yml
lint.yml
 1  name: Lint
 2  
 3  on:
 4    push:
 5      branches: [ main, master ]
 6    pull_request:
 7      branches: [ main, master ]
 8      types: [opened, synchronize, reopened]
 9  
10  jobs:
11    lint:
12      runs-on: ubuntu-latest
13      steps:
14      - uses: actions/checkout@v4
15      
16      - name: Set up Python
17        uses: actions/setup-python@v5
18        with:
19          python-version: '3.11'
20          
21      - name: Install dependencies
22        run: |
23          pip install black
24          
25      - name: Check code formatting with Black
26        run: |
27          black --check .