Format code with ruff #6
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: Linting | |
| # Build on every branch push, tag push, and pull request change: | |
| on: [push, pull_request] | |
| jobs: | |
| mypy: | |
| name: mypy | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout reposistory | |
| uses: actions/checkout@main | |
| - name: Set up Python 3.9 | |
| uses: actions/setup-python@main | |
| with: | |
| python-version: 3.9 | |
| - name: Install Dependencies | |
| run: | | |
| python3 -m pip install -r requirements.txt | |
| python3 -m pip install -U maturin | |
| python3 -m pip install -U mypy | |
| - name: mypy | |
| run: mypy --show-column-numbers --hide-error-context . | |
| ruff: | |
| runs-on: ubuntu-latest | |
| name: ruff | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@main | |
| - name: Set up Python 3.9 | |
| uses: actions/setup-python@main | |
| with: | |
| python-version: '3.9' | |
| - name: Setup venv | |
| run: | | |
| python3 -m venv .venv | |
| - name: Install Dependencies | |
| run: | | |
| . .venv/bin/activate | |
| python3 -m pip install -U -r requirements.txt | |
| python3 -m pip install -U ruff | |
| - name: mypy | |
| run: | | |
| . .venv/bin/activate | |
| ruff check | |
| ruff_format: | |
| name: ruff format | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@main | |
| - name: Set up Python 3.9 | |
| uses: actions/setup-python@main | |
| with: | |
| python-version: 3.9 | |
| - name: Setup venv | |
| run: | | |
| python3 -m venv .venv | |
| - name: Install dependencies | |
| run: | | |
| . .venv/bin/activate | |
| python3 -m pip install -U ruff | |
| - name: mypy | |
| run: | | |
| . .venv/bin/activate | |
| ruff format src/ --check |