优化notifier.py中的代码格式,调整日志记录和推送内容的处理逻辑,增强可读性和稳定性。移除不再展示的链接,并改进无效建议的过滤条件。
#43
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: CI | |
| on: | |
| push: | |
| branches: [ master ] | |
| pull_request: | |
| branches: [ master ] | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| python-version: ["3.10", "3.11"] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install uv | |
| run: | | |
| curl -LsSf https://astral.sh/uv/install.sh | sh | |
| echo "$HOME/.cargo/bin" >> $GITHUB_PATH | |
| - name: Create virtual environment and install dependencies | |
| run: | | |
| uv venv | |
| source .venv/bin/activate | |
| uv pip install -r requirements.txt | |
| uv pip install -e . | |
| - name: black code formatting | |
| run: | | |
| source .venv/bin/activate | |
| black . --check --exclude '\.venv|\.git' | |
| - name: Lint with flake8 | |
| run: | | |
| source .venv/bin/activate | |
| flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics --exclude=.venv,.git | |
| flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics --exclude=.venv,.git |