Multiple fix #678
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Static Analysis | |
| on: | |
| pull_request: | |
| branches: [ main ] | |
| push: | |
| branches: [ main ] | |
| permissions: | |
| contents: read | |
| jobs: | |
| flake8: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.11' | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install flake8==7.3.0 | |
| - name: Run flake8 static analysis | |
| # E9 (syntax errors), all of pyflakes (F: undefined names, unused imports, | |
| # unused locals, %-format errors, f-strings without placeholders, ...), plus | |
| # high-value correctness rules: W605 invalid escape sequence, E711-E714 | |
| # None/True/membership comparisons, E722 bare except, E401 multiple imports | |
| # on one line. Bulk formatting rules (E501 line length, W291/W293 trailing | |
| # whitespace, E3xx blank lines) are intentionally left out. | |
| run: | | |
| flake8 . --count --select=E9,F,W605,E711,E712,E713,E714,E722,E401 --show-source --statistics |