Skip to content

Merge pull request #6558 from trailofbits/fix_premature_logging #98

Merge pull request #6558 from trailofbits/fix_premature_logging

Merge pull request #6558 from trailofbits/fix_premature_logging #98

Workflow file for this run

name: 🐍 Lint Python
on:
workflow_dispatch: {}
push:
paths:
- "**.py"
jobs:
lint-python:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.7', '3.8', '3.9', '3.10']
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
# for debugging issues locally: https://github.com/actions/setup-python/blob/main/docs/advanced-usage.md#avoiding-rate-limit-issues
- name: Pip install dependencies and PolyTracker
run: |
python -m pip install --upgrade pip
python -m pip install setuptools
pip install .[dev]
- name: Flake8
run: |
echo "This flake8 run stops the build if there are Python syntax errors or undefined names, and returns 0 if successful."
flake8 build_in_docker docs eval polytracker tests setup.py --count --select=E9,F63,F7,F82 --show-source --statistics --exclude compiler-rt
echo "This flake8 run will exit 0 if there are errors! Note exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide"
flake8 build_in_docker docs eval polytracker tests setup.py --ignore=F405,F403,W503,E203,E265 --count --exit-zero --max-complexity=30 --max-line-length=127 --statistics --exclude compiler-rt
- name: Black
run: |
black --check . --exclude '/(polytracker/src|third_party)/'
- name: MyPy
run: |
mypy --python-version ${{ matrix.python-version }} --ignore-missing-imports polytracker tests build_in_docker eval --exclude compiler-rt