Update core_utils.py #921
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: Verify Codebase | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| jobs: | |
| validate: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Checkout Code | |
| uses: actions/checkout@v4 | |
| with: | |
| token: ${{ secrets.BOT_GITHUB_TOKEN }} | |
| fetch-depth: 0 | |
| - name: Set up Python 3.12 | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| - name: Install Dependencies | |
| run: | | |
| pip install ruff mypy pytest | |
| pip install -e . | |
| pip install types-requests types-chardet | |
| - name: 🪄 Auto-Fix Linting & Formatting | |
| run: | | |
| ruff check --fix src/ tests/ | |
| ruff format src/ tests/ | |
| - name: 🚀 Commit & Push Fixes | |
| uses: stefanzweifel/git-auto-commit-action@v5 | |
| with: | |
| commit_message: "🪄 PyOB: Automated Lint & Format Fixes" | |
| commit_user_name: "pyob-bot" | |
| commit_user_email: "pyob-bot@users.noreply.github.com" | |
| # YOU MUST PASS THE TOKEN HERE | |
| file_pattern: '.' | |
| env: | |
| # This is required for the git-auto-commit-action to have push rights | |
| GITHUB_TOKEN: ${{ secrets.BOT_GITHUB_TOKEN }} | |
| - name: Run PyOB Validation Suite | |
| run: | | |
| chmod +x check.sh | |
| ./check.sh --fix |