Skip to content

[pre-commit.ci] pre-commit autoupdate #99

[pre-commit.ci] pre-commit autoupdate

[pre-commit.ci] pre-commit autoupdate #99

Workflow file for this run

name: Linting checks
on:
push:
branches: [ "main", "dev" ]
pull_request:
branches: [ "main", "dev" ]
permissions:
contents: read
jobs:
build:
name: Linting
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13-dev"]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Set the Python path to the package root
run: |
echo "PYTHONPATH=bytemaker" >> $GITHUB_ENV
- name: Install dependencies
run: |
python -m pip install --upgrade pip
# Install the dependencies specified in pyproject.toml (core dependencies)
python -m pip install .
# Install additional dependencies under testing (e.g., flake8)
python -m pip install .[testing]
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics --ignore=F841,W504,E731,C901,E701 --per-file-ignores="__init__.py:F401"
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics