Skip to content

Don't start PyTorch thread just doing import. (#516) #1317

Don't start PyTorch thread just doing import. (#516)

Don't start PyTorch thread just doing import. (#516) #1317

Workflow file for this run

name: Linting
on:
push:
branches:
- main
pull_request:
# We do type checking and linting only on one python version to
# reduce time, since it is unlikely that linting will be version
# specific.
jobs:
mypy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install poetry
run: pipx install poetry
- uses: actions/setup-python@v4
with:
python-version: '3.9'
cache: 'poetry'
- name: Install sycamore
run: poetry install
- name: Run mypy
run: |
mkdir .mypy_cache/
poetry run mypy --install-types --non-interactive .
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install poetry
run: pipx install poetry
- uses: actions/setup-python@v4
with:
python-version: '3.9'
cache: 'poetry'
- name: Install sycamore
run: poetry install
- name: Lint with ruff
run: poetry run ruff check .
- name: Lint with black
run: poetry run black --check .