fix: 移除flake8中不存在的W504规则 #9
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: Code Quality | |
| on: | |
| push: | |
| branches: [ main, develop ] | |
| pull_request: | |
| branches: [ main, develop ] | |
| jobs: | |
| quality: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: "3.9" | |
| - name: Cache pip dependencies | |
| uses: actions/cache@v3 | |
| with: | |
| path: ~/.cache/pip | |
| key: ${{ runner.os }}-pip-quality-${{ hashFiles('**/requirements.txt') }} | |
| restore-keys: | | |
| ${{ runner.os }}-pip-quality- | |
| - name: Install quality tools | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install black isort flake8 mypy pre-commit | |
| - name: Run pre-commit hooks | |
| run: | | |
| pre-commit run --all-files --show-diff-on-failure | |
| - name: Check security issues | |
| run: | | |
| pip install safety | |
| safety check | |
| - name: Generate dependency report | |
| run: | | |
| pip install pip-licenses | |
| pip-licenses --format=markdown --output-file=DEPENDENCY_REPORT.md |