refactor: simplify initialization logic in main entry point #3
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 & Syntax Check | |
| on: | |
| push: | |
| branches: ["main", "master"] | |
| pull_request: | |
| branches: ["main", "master"] | |
| jobs: | |
| lint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.10" # pybricks uses micropython based on python 3 | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install ruff | |
| - name: Run Ruff Linter | |
| run: | | |
| # Stop the build if there are Python syntax errors or undefined names | |
| # E9, F63, F7, F82 are syntax/runtime critical errors | |
| ruff check . --select=E9,F63,F7,F82 --output-format=github | |
| - name: Verify Code Formatting | |
| run: | | |
| # Warning only: check general formatting style (doesn't fail the build) | |
| ruff check . --output-format=github --exit-zero |