name: Lint on: [push, pull_request] jobs: lint: runs-on: ubuntu-latest steps: - name: Checkout code uses: actions/checkout@v3 - name: Set up Python uses: actions/setup-python@v4 with: python-version: '3.11' - name: Install dependencies run: | python -m pip install --upgrade pip pip install flake8 black mypy - name: Run flake8 run: | # Stop the build if there are Python syntax errors or undefined names flake8 pyPhotoAlbum --count --select=E9,F63,F7,F82 --show-source --statistics # Exit-zero treats all errors as warnings flake8 pyPhotoAlbum --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics - name: Check formatting with black run: | black --check pyPhotoAlbum continue-on-error: true - name: Type check with mypy run: | mypy pyPhotoAlbum --ignore-missing-imports continue-on-error: true