Skip to content

Python lint

Python lint #451

Workflow file for this run

name: Python lint
permissions:
contents: read
# Cancel workflow if there is a new change to the branch.
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
on:
merge_group:
pull_request:
branches:
- main
paths:
- "**/*.py"
- ".github/workflows/python-lint.yml"
push:
branches:
- main
paths:
- "**/*.py"
- ".github/workflows/python-lint.yml"
jobs:
python-lint:
if: ${{ !startsWith(github.ref, 'refs/heads/gh-readonly-queue/') }}
runs-on: ubuntu-slim
steps:
- uses: actions/checkout@v6
- uses: actions/setup-python@v6
with:
python-version: "3.12"
- run: pip install black flake8
- name: Run black
run: black --check scripts/
- name: Run flake8
run: flake8 scripts/