Skip to content

Update reference

Update reference #50

Workflow file for this run

name: Typecheck
on: [push, pull_request]
jobs:
Typecheck:
# We want to run on external PRs, but not on our own internal PRs as they'll be run
# by the push to the branch. Without this if check, checks are duplicated since
# internal PRs match both the push and pull_request events.
if:
github.event_name == 'push' || github.event.pull_request.head.repo.full_name !=
github.repository
runs-on: ubuntu-latest
steps:
- name: Assert PR target is main
if: github.event_name == 'pull_request' && github.repository == 'psf/black'
run: |
if [ "$GITHUB_BASE_REF" != "main" ]; then
echo "::error::PR targeting '$GITHUB_BASE_REF', please refile targeting 'main'." && exit 1
fi
- uses: actions/checkout@v4
- run: pipx install poetry
- uses: actions/setup-python@v4
with:
cache: 'poetry'
- run: poetry install --all-extras
- run: echo "$(poetry env info --path)/bin" >> $GITHUB_PATH
- uses: jakebailey/pyright-action@v1
with:
pylance-version: latest-release