Avoid checking types of Callable when both type objects are pointing to the same reference. This is a small check which would speed up cases drastically such as recursive generics with unions, since the type is equal but Pytype holds the expanded union type and attempts to go in deep to figure out each individual type matches. #2337
Workflow file for this run
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: CI | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
workflow_dispatch: | |
jobs: | |
test: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-20.04, macos-latest, windows-latest] | |
python-version: ['3.10', '3.11', '3.12'] | |
shard: [shard_1, shard_2, shard_3] # Keep this synced with ALL_TESTS_SHARD_COUNT | |
exclude: | |
- os: macos-latest | |
python-version: '3.10' | |
- os: macos-latest | |
python-version: '3.11' | |
- os: windows-latest | |
python-version: '3.10' | |
- os: windows-latest | |
python-version: '3.11' | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Install Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
allow-prereleases: true | |
- name: Install system packages | |
if: runner.os == 'Linux' | |
run: sudo apt-get install -y bison cmake flex g++ | |
- name: Setup Developer Command Prompt | |
if: runner.os == 'Windows' | |
uses: ilammy/msvc-dev-cmd@v1 | |
- name: Install Dependencies | |
run: pip install --no-deps -r requirements.txt | |
- name: Build | |
run: python build_scripts/build.py | |
- name: Run Tests | |
run: python build_scripts/run_tests.py -f -v test_all_${{ matrix.shard }}_of_3 # Keep this synced with ALL_TESTS_SHARD_COUNT | |
continue-on-error: ${{ matrix.python-version == '3.13' }} | |
check: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-20.04] | |
python-version: ['3.10', '3.11', '3.12'] | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Install Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
allow-prereleases: true | |
- name: Install system packages | |
if: runner.os == 'Linux' | |
run: sudo apt-get install -y bison cmake flex g++ | |
- name: Install Dependencies | |
run: pip install --no-deps -r requirements.txt | |
- name: Lint | |
if: matrix.python-version == '3.12' | |
run: pylint build_scripts pytype pytype_extensions setup.py -j 0 | |
- name: Build | |
run: python build_scripts/build.py | |
- name: Type Check | |
run: python out/bin/pytype -j auto |