Use Optional[T]
instead of T | None
for Python 3.9 compatibility
#262
This file contains 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 | |
on: | |
- push | |
- pull_request | |
- workflow_dispatch | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
os: [ ubuntu-latest ] | |
fail-fast: false | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: '3.12' | |
- run: pip install ruff | |
- run: make lint | |
pre-commit: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: '3.12' | |
- uses: pre-commit/[email protected] | |
mypy: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: "3.12" | |
# pip doesn't support this | |
- uses: astral-sh/setup-uv@v4 | |
- run: uv pip install -r ./pyproject.toml --extra types --system | |
- run: mypy . |