From 3d910e66c4315fe6ae7fc42fe3da0a404a04b024 Mon Sep 17 00:00:00 2001 From: Jelle Zijlstra Date: Fri, 27 Feb 2026 21:34:17 -0800 Subject: [PATCH 1/3] Conformance: lock checker env and add freshness CI --- .github/workflows/conformance.yml | 42 +++++ conformance/README.md | 23 ++- conformance/pyproject.toml | 15 ++ conformance/requirements.txt | 7 - conformance/scripts/bump_type_checkers.py | 29 ++++ conformance/src/type_checker.py | 102 +++++------- conformance/uv.lock | 179 ++++++++++++++++++++++ 7 files changed, 322 insertions(+), 75 deletions(-) create mode 100644 .github/workflows/conformance.yml create mode 100644 conformance/pyproject.toml delete mode 100644 conformance/requirements.txt create mode 100755 conformance/scripts/bump_type_checkers.py create mode 100644 conformance/uv.lock diff --git a/.github/workflows/conformance.yml b/.github/workflows/conformance.yml new file mode 100644 index 00000000..8ad72d8d --- /dev/null +++ b/.github/workflows/conformance.yml @@ -0,0 +1,42 @@ +name: Conformance + +on: + push: + pull_request: + +permissions: + contents: read + +jobs: + conformance: + name: Run conformance suite + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v6 + + - name: Set up Python 3.12 + uses: actions/setup-python@v6 + with: + python-version: "3.12" + cache: "pip" + + - name: Install uv + run: | + python -m pip install --upgrade pip + python -m pip install uv + + - name: Run conformance suite + working-directory: conformance + run: | + uv sync --python 3.12 --frozen + uv run --python 3.12 --frozen python src/main.py + + - name: Assert conformance results are up to date + run: | + if [ -n "$(git status --porcelain -- conformance/results)" ]; then + git status --short conformance/results + git diff -- conformance/results + echo "Conformance results are out of date. Run conformance/src/main.py and commit updated results." + exit 1 + fi diff --git a/conformance/README.md b/conformance/README.md index e0302c80..f4510de2 100644 --- a/conformance/README.md +++ b/conformance/README.md @@ -70,9 +70,9 @@ by the scoring system. To run the conformance test suite: * Clone the https://github.com/python/typing repo. -* Create and activate a Python 3.12 virtual environment. -* Switch to the `conformance` subdirectory and install all dependencies (`pip install -r requirements.txt`). -* Switch to the `src` subdirectory and run `python main.py`. +* Install [uv](https://docs.astral.sh/uv/) and ensure Python 3.12 is available. +* Switch to the `conformance` subdirectory and install locked dependencies (`uv sync --python 3.12 --frozen`). +* Run the conformance tool (`uv run --python 3.12 --frozen python src/main.py`). Note that some type checkers may not run on some platforms. If a type checker fails to install, tests will be skipped for that type checker. @@ -92,7 +92,22 @@ If a test is updated (augmented or fixed), the process is similar to when adding ## Updating a Type Checker -If a new version of a type checker is released, re-run the test tool with the new version. If the type checker output has changed for any test cases, the tool will supply the old and new outputs. Examine these to determine whether the conformance status has changed. Once the conformance status has been updated, re-run the test tool again to regenerate the summary report. +Type checker versions are locked in `uv.lock`. + +To bump all supported checkers to their latest released versions: + +```bash +python scripts/bump_type_checkers.py +``` + +After bumping, install the new lockfile and rerun conformance: + +```bash +uv sync --python 3.12 --frozen +uv run --python 3.12 --frozen python src/main.py +``` + +If checker output changes for any test cases, examine those deltas to determine whether the conformance status has changed. Once the conformance status has been updated, rerun the tool to regenerate the summary report. ## Automated Conformance Checking diff --git a/conformance/pyproject.toml b/conformance/pyproject.toml new file mode 100644 index 00000000..9b511933 --- /dev/null +++ b/conformance/pyproject.toml @@ -0,0 +1,15 @@ +[project] +name = "typing-conformance" +version = "0.1.0" +requires-python = "==3.12.*" +dependencies = [ + "mypy", + "pyrefly", + "pyright", + "tomli", + "tomlkit", + "zuban", +] + +[tool.uv] +package = false diff --git a/conformance/requirements.txt b/conformance/requirements.txt deleted file mode 100644 index eac56a05..00000000 --- a/conformance/requirements.txt +++ /dev/null @@ -1,7 +0,0 @@ -tomli -tomlkit -pyright -mypy -pip -zuban -pyrefly diff --git a/conformance/scripts/bump_type_checkers.py b/conformance/scripts/bump_type_checkers.py new file mode 100755 index 00000000..da7f698e --- /dev/null +++ b/conformance/scripts/bump_type_checkers.py @@ -0,0 +1,29 @@ +#!/usr/bin/env python3 +""" +Update the conformance checker versions in uv.lock to the latest releases. +""" + +from pathlib import Path +from subprocess import CalledProcessError, run + + +TYPE_CHECKERS = ("mypy", "pyright", "zuban", "pyrefly") + + +def main() -> int: + root_dir = Path(__file__).resolve().parents[1] + lock_command = ["uv", "lock", "--python", "3.12"] + for checker in TYPE_CHECKERS: + lock_command.extend(["--upgrade-package", checker]) + + try: + print("+", " ".join(lock_command)) + run(lock_command, cwd=root_dir, check=True) + except CalledProcessError as exc: + print(f"Failed with exit code {exc.returncode}") + return exc.returncode + return 0 + + +if __name__ == "__main__": + raise SystemExit(main()) diff --git a/conformance/src/type_checker.py b/conformance/src/type_checker.py index 7406a8ac..865821f4 100644 --- a/conformance/src/type_checker.py +++ b/conformance/src/type_checker.py @@ -5,8 +5,6 @@ from abc import ABC, abstractmethod import json from pathlib import Path -import os -import re import shutil from subprocess import PIPE, CalledProcessError, run import sys @@ -25,8 +23,8 @@ def name(self) -> str: @abstractmethod def install(self) -> bool: """ - Ensures that the latest version of the type checker is installed. - Returns False if installation fails. + Ensures that the type checker is available in the current environment. + Returns False if it cannot be executed. """ raise NotImplementedError @@ -67,29 +65,24 @@ def install(self) -> bool: pass try: - # Uninstall any existing version if present. - run( - [sys.executable, "-m", "pip", "uninstall", "mypy", "-y"], - check=True, - ) - - # Install the latest version. - run( - [sys.executable, "-m", "pip", "install", "mypy"], - check=True, - ) - - # Run "mypy --version" to ensure that it's installed and to work + # Run "mypy --version" to ensure that it's available and to work # around timing issues caused by malware scanners on some systems. self.get_version() - return True - except CalledProcessError: - print("Unable to install mypy") + except (CalledProcessError, FileNotFoundError): + print( + "Unable to run mypy. Install conformance dependencies with " + "'uv sync --frozen' from the conformance directory." + ) return False def get_version(self) -> str: - proc = run([sys.executable, "-m", "mypy", "--version"], stdout=PIPE, text=True) + proc = run( + [sys.executable, "-m", "mypy", "--version"], + check=True, + stdout=PIPE, + text=True, + ) version = proc.stdout.strip() # Remove the " (compiled)" if it's present. @@ -137,29 +130,23 @@ def name(self) -> str: def install(self) -> bool: try: - # Uninstall any old version if present. - run( - [sys.executable, "-m", "pip", "uninstall", "pyright", "-y"], - check=True, - ) - - # Install the latest version. - run( - [sys.executable, "-m", "pip", "install", "pyright"], - check=True, - ) - # Force the Python wrapper to install node if needed - # and download the latest version of pyright. + # and use the locked version of pyright. self.get_version() return True - except CalledProcessError: - print("Unable to install pyright") + except (CalledProcessError, FileNotFoundError): + print( + "Unable to run pyright. Install conformance dependencies with " + "'uv sync --frozen' from the conformance directory." + ) return False def get_version(self) -> str: proc = run( - [sys.executable, "-m", "pyright", "--version"], stdout=PIPE, text=True + [sys.executable, "-m", "pyright", "--version"], + check=True, + stdout=PIPE, + text=True, ) return proc.stdout.strip() @@ -208,24 +195,17 @@ def name(self) -> str: def install(self) -> bool: try: - # Uninstall any existing version if present. - run( - [sys.executable, "-m", "pip", "uninstall", "zuban", "-y"], - check=True, - ) - - # Install the latest version. - run( - [sys.executable, "-m", "pip", "install", "zuban"], - check=True, - ) + self.get_version() return True - except CalledProcessError: - print("Unable to install zuban") + except (CalledProcessError, FileNotFoundError): + print( + "Unable to run zuban. Install conformance dependencies with " + "'uv sync --frozen' from the conformance directory." + ) return False def get_version(self) -> str: - proc = run(["zuban", "--version"], stdout=PIPE, text=True) + proc = run(["zuban", "--version"], check=True, stdout=PIPE, text=True) return proc.stdout.strip() def run_tests(self, test_files: Sequence[str]) -> dict[str, str]: @@ -268,23 +248,17 @@ def name(self) -> str: def install(self) -> bool: try: - # Uninstall any existing version if present. - run( - [sys.executable, "-m", "pip", "uninstall", "pyrefly", "-y"], - check=True, - ) - # Install the latest version. - run( - [sys.executable, "-m", "pip", "install", "pyrefly"], - check=True, - ) + self.get_version() return True - except CalledProcessError: - print("Unable to install pyrefly") + except (CalledProcessError, FileNotFoundError): + print( + "Unable to run pyrefly. Install conformance dependencies with " + "'uv sync --frozen' from the conformance directory." + ) return False def get_version(self) -> str: - proc = run(["pyrefly", "--version"], stdout=PIPE, text=True) + proc = run(["pyrefly", "--version"], check=True, stdout=PIPE, text=True) version = proc.stdout.strip() return version diff --git a/conformance/uv.lock b/conformance/uv.lock new file mode 100644 index 00000000..2c2c6ba7 --- /dev/null +++ b/conformance/uv.lock @@ -0,0 +1,179 @@ +version = 1 +revision = 3 +requires-python = "==3.12.*" + +[[package]] +name = "librt" +version = "0.8.1" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/56/9c/b4b0c54d84da4a94b37bd44151e46d5e583c9534c7e02250b961b1b6d8a8/librt-0.8.1.tar.gz", hash = "sha256:be46a14693955b3bd96014ccbdb8339ee8c9346fbe11c1b78901b55125f14c73", size = 177471, upload-time = "2026-02-17T16:13:06.101Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/95/21/d39b0a87ac52fc98f621fb6f8060efb017a767ebbbac2f99fbcbc9ddc0d7/librt-0.8.1-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:a28f2612ab566b17f3698b0da021ff9960610301607c9a5e8eaca62f5e1c350a", size = 66516, upload-time = "2026-02-17T16:11:41.604Z" }, + { url = "https://files.pythonhosted.org/packages/69/f1/46375e71441c43e8ae335905e069f1c54febee63a146278bcee8782c84fd/librt-0.8.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:60a78b694c9aee2a0f1aaeaa7d101cf713e92e8423a941d2897f4fa37908dab9", size = 68634, upload-time = "2026-02-17T16:11:43.268Z" }, + { url = "https://files.pythonhosted.org/packages/0a/33/c510de7f93bf1fa19e13423a606d8189a02624a800710f6e6a0a0f0784b3/librt-0.8.1-cp312-cp312-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:758509ea3f1eba2a57558e7e98f4659d0ea7670bff49673b0dde18a3c7e6c0eb", size = 198941, upload-time = "2026-02-17T16:11:44.28Z" }, + { url = "https://files.pythonhosted.org/packages/dd/36/e725903416409a533d92398e88ce665476f275081d0d7d42f9c4951999e5/librt-0.8.1-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:039b9f2c506bd0ab0f8725aa5ba339c6f0cd19d3b514b50d134789809c24285d", size = 209991, upload-time = "2026-02-17T16:11:45.462Z" }, + { url = "https://files.pythonhosted.org/packages/30/7a/8d908a152e1875c9f8eac96c97a480df425e657cdb47854b9efaa4998889/librt-0.8.1-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:5bb54f1205a3a6ab41a6fd71dfcdcbd278670d3a90ca502a30d9da583105b6f7", size = 224476, upload-time = "2026-02-17T16:11:46.542Z" }, + { url = "https://files.pythonhosted.org/packages/a8/b8/a22c34f2c485b8903a06f3fe3315341fe6876ef3599792344669db98fcff/librt-0.8.1-cp312-cp312-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:05bd41cdee35b0c59c259f870f6da532a2c5ca57db95b5f23689fcb5c9e42440", size = 217518, upload-time = "2026-02-17T16:11:47.746Z" }, + { url = "https://files.pythonhosted.org/packages/79/6f/5c6fea00357e4f82ba44f81dbfb027921f1ab10e320d4a64e1c408d035d9/librt-0.8.1-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:adfab487facf03f0d0857b8710cf82d0704a309d8ffc33b03d9302b4c64e91a9", size = 225116, upload-time = "2026-02-17T16:11:49.298Z" }, + { url = "https://files.pythonhosted.org/packages/f2/a0/95ced4e7b1267fe1e2720a111685bcddf0e781f7e9e0ce59d751c44dcfe5/librt-0.8.1-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:153188fe98a72f206042be10a2c6026139852805215ed9539186312d50a8e972", size = 217751, upload-time = "2026-02-17T16:11:50.49Z" }, + { url = "https://files.pythonhosted.org/packages/93/c2/0517281cb4d4101c27ab59472924e67f55e375bc46bedae94ac6dc6e1902/librt-0.8.1-cp312-cp312-musllinux_1_2_riscv64.whl", hash = "sha256:dd3c41254ee98604b08bd5b3af5bf0a89740d4ee0711de95b65166bf44091921", size = 218378, upload-time = "2026-02-17T16:11:51.783Z" }, + { url = "https://files.pythonhosted.org/packages/43/e8/37b3ac108e8976888e559a7b227d0ceac03c384cfd3e7a1c2ee248dbae79/librt-0.8.1-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:e0d138c7ae532908cbb342162b2611dbd4d90c941cd25ab82084aaf71d2c0bd0", size = 241199, upload-time = "2026-02-17T16:11:53.561Z" }, + { url = "https://files.pythonhosted.org/packages/4b/5b/35812d041c53967fedf551a39399271bbe4257e681236a2cf1a69c8e7fa1/librt-0.8.1-cp312-cp312-win32.whl", hash = "sha256:43353b943613c5d9c49a25aaffdba46f888ec354e71e3529a00cca3f04d66a7a", size = 54917, upload-time = "2026-02-17T16:11:54.758Z" }, + { url = "https://files.pythonhosted.org/packages/de/d1/fa5d5331b862b9775aaf2a100f5ef86854e5d4407f71bddf102f4421e034/librt-0.8.1-cp312-cp312-win_amd64.whl", hash = "sha256:ff8baf1f8d3f4b6b7257fcb75a501f2a5499d0dda57645baa09d4d0d34b19444", size = 62017, upload-time = "2026-02-17T16:11:55.748Z" }, + { url = "https://files.pythonhosted.org/packages/c7/7c/c614252f9acda59b01a66e2ddfd243ed1c7e1deab0293332dfbccf862808/librt-0.8.1-cp312-cp312-win_arm64.whl", hash = "sha256:0f2ae3725904f7377e11cc37722d5d401e8b3d5851fb9273d7f4fe04f6b3d37d", size = 52441, upload-time = "2026-02-17T16:11:56.801Z" }, +] + +[[package]] +name = "mypy" +version = "1.19.1" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "librt", marker = "platform_python_implementation != 'PyPy'" }, + { name = "mypy-extensions" }, + { name = "pathspec" }, + { name = "typing-extensions" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/f5/db/4efed9504bc01309ab9c2da7e352cc223569f05478012b5d9ece38fd44d2/mypy-1.19.1.tar.gz", hash = "sha256:19d88bb05303fe63f71dd2c6270daca27cb9401c4ca8255fe50d1d920e0eb9ba", size = 3582404, upload-time = "2025-12-15T05:03:48.42Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/06/8a/19bfae96f6615aa8a0604915512e0289b1fad33d5909bf7244f02935d33a/mypy-1.19.1-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:a8174a03289288c1f6c46d55cef02379b478bfbc8e358e02047487cad44c6ca1", size = 13206053, upload-time = "2025-12-15T05:03:46.622Z" }, + { url = "https://files.pythonhosted.org/packages/a5/34/3e63879ab041602154ba2a9f99817bb0c85c4df19a23a1443c8986e4d565/mypy-1.19.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:ffcebe56eb09ff0c0885e750036a095e23793ba6c2e894e7e63f6d89ad51f22e", size = 12219134, upload-time = "2025-12-15T05:03:24.367Z" }, + { url = "https://files.pythonhosted.org/packages/89/cc/2db6f0e95366b630364e09845672dbee0cbf0bbe753a204b29a944967cd9/mypy-1.19.1-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:b64d987153888790bcdb03a6473d321820597ab8dd9243b27a92153c4fa50fd2", size = 12731616, upload-time = "2025-12-15T05:02:44.725Z" }, + { url = "https://files.pythonhosted.org/packages/00/be/dd56c1fd4807bc1eba1cf18b2a850d0de7bacb55e158755eb79f77c41f8e/mypy-1.19.1-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:c35d298c2c4bba75feb2195655dfea8124d855dfd7343bf8b8c055421eaf0cf8", size = 13620847, upload-time = "2025-12-15T05:03:39.633Z" }, + { url = "https://files.pythonhosted.org/packages/6d/42/332951aae42b79329f743bf1da088cd75d8d4d9acc18fbcbd84f26c1af4e/mypy-1.19.1-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:34c81968774648ab5ac09c29a375fdede03ba253f8f8287847bd480782f73a6a", size = 13834976, upload-time = "2025-12-15T05:03:08.786Z" }, + { url = "https://files.pythonhosted.org/packages/6f/63/e7493e5f90e1e085c562bb06e2eb32cae27c5057b9653348d38b47daaecc/mypy-1.19.1-cp312-cp312-win_amd64.whl", hash = "sha256:b10e7c2cd7870ba4ad9b2d8a6102eb5ffc1f16ca35e3de6bfa390c1113029d13", size = 10118104, upload-time = "2025-12-15T05:03:10.834Z" }, + { url = "https://files.pythonhosted.org/packages/8d/f4/4ce9a05ce5ded1de3ec1c1d96cf9f9504a04e54ce0ed55cfa38619a32b8d/mypy-1.19.1-py3-none-any.whl", hash = "sha256:f1235f5ea01b7db5468d53ece6aaddf1ad0b88d9e7462b86ef96fe04995d7247", size = 2471239, upload-time = "2025-12-15T05:03:07.248Z" }, +] + +[[package]] +name = "mypy-extensions" +version = "1.1.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/a2/6e/371856a3fb9d31ca8dac321cda606860fa4548858c0cc45d9d1d4ca2628b/mypy_extensions-1.1.0.tar.gz", hash = "sha256:52e68efc3284861e772bbcd66823fde5ae21fd2fdb51c62a211403730b916558", size = 6343, upload-time = "2025-04-22T14:54:24.164Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/79/7b/2c79738432f5c924bef5071f933bcc9efd0473bac3b4aa584a6f7c1c8df8/mypy_extensions-1.1.0-py3-none-any.whl", hash = "sha256:1be4cccdb0f2482337c4743e60421de3a356cd97508abadd57d47403e94f5505", size = 4963, upload-time = "2025-04-22T14:54:22.983Z" }, +] + +[[package]] +name = "nodeenv" +version = "1.10.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/24/bf/d1bda4f6168e0b2e9e5958945e01910052158313224ada5ce1fb2e1113b8/nodeenv-1.10.0.tar.gz", hash = "sha256:996c191ad80897d076bdfba80a41994c2b47c68e224c542b48feba42ba00f8bb", size = 55611, upload-time = "2025-12-20T14:08:54.006Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/88/b2/d0896bdcdc8d28a7fc5717c305f1a861c26e18c05047949fb371034d98bd/nodeenv-1.10.0-py2.py3-none-any.whl", hash = "sha256:5bb13e3eed2923615535339b3c620e76779af4cb4c6a90deccc9e36b274d3827", size = 23438, upload-time = "2025-12-20T14:08:52.782Z" }, +] + +[[package]] +name = "pathspec" +version = "1.0.4" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/fa/36/e27608899f9b8d4dff0617b2d9ab17ca5608956ca44461ac14ac48b44015/pathspec-1.0.4.tar.gz", hash = "sha256:0210e2ae8a21a9137c0d470578cb0e595af87edaa6ebf12ff176f14a02e0e645", size = 131200, upload-time = "2026-01-27T03:59:46.938Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/ef/3c/2c197d226f9ea224a9ab8d197933f9da0ae0aac5b6e0f884e2b8d9c8e9f7/pathspec-1.0.4-py3-none-any.whl", hash = "sha256:fb6ae2fd4e7c921a165808a552060e722767cfa526f99ca5156ed2ce45a5c723", size = 55206, upload-time = "2026-01-27T03:59:45.137Z" }, +] + +[[package]] +name = "pyrefly" +version = "0.54.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/81/44/c10b16a302fda90d0af1328f880b232761b510eab546616a7be2fdf35a57/pyrefly-0.54.0.tar.gz", hash = "sha256:c6663be64d492f0d2f2a411ada9f28a6792163d34133639378b7f3dd9a8dca94", size = 5098893, upload-time = "2026-02-23T15:44:35.111Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/5f/99/8fdcdb4e55f0227fdd9f6abce36b619bab1ecb0662b83b66adc8cba3c788/pyrefly-0.54.0-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:58a3f092b6dc25ef79b2dc6c69a40f36784ca157c312bfc0baea463926a9db6d", size = 12223973, upload-time = "2026-02-23T15:44:14.278Z" }, + { url = "https://files.pythonhosted.org/packages/90/35/c2aaf87a76003ad27b286594d2e5178f811eaa15bfe3d98dba2b47d56dd1/pyrefly-0.54.0-py3-none-macosx_11_0_arm64.whl", hash = "sha256:615081414106dd95873bc39c3a4bed68754c6cc24a8177ac51d22f88f88d3eb3", size = 11785585, upload-time = "2026-02-23T15:44:17.468Z" }, + { url = "https://files.pythonhosted.org/packages/c4/4a/ced02691ed67e5a897714979196f08ad279ec7ec7f63c45e00a75a7f3c0e/pyrefly-0.54.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0cbcaf20f5fe585079079a95205c1f3cd4542d17228cdf1df560288880623b70", size = 33381977, upload-time = "2026-02-23T15:44:19.736Z" }, + { url = "https://files.pythonhosted.org/packages/0b/ce/72a117ed437c8f6950862181014b41e36f3c3997580e29b772b71e78d587/pyrefly-0.54.0-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:66d5da116c0d34acfbd66663addd3ca8aa78a636f6692a66e078126d3620a883", size = 35962821, upload-time = "2026-02-23T15:44:22.357Z" }, + { url = "https://files.pythonhosted.org/packages/85/de/89013f5ae0a35d2b6b01274a92a35ee91431ea001050edf0a16748d39875/pyrefly-0.54.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6ef3ac27f1a4baaf67aead64287d3163350844794aca6315ad1a9650b16ec26a", size = 38496689, upload-time = "2026-02-23T15:44:25.236Z" }, + { url = "https://files.pythonhosted.org/packages/9f/9a/33b097c7bf498b924742dca32dd5d9c6a3fa6c2b52b63a58eb9e1980ca89/pyrefly-0.54.0-py3-none-win32.whl", hash = "sha256:7d607d72200a8afbd2db10bfefb40160a7a5d709d207161c21649cedd5cfc09a", size = 11295268, upload-time = "2026-02-23T15:44:27.551Z" }, + { url = "https://files.pythonhosted.org/packages/d4/21/9263fd1144d2a3d7342b474f183f7785b3358a1565c864089b780110b933/pyrefly-0.54.0-py3-none-win_amd64.whl", hash = "sha256:fd416f04f89309385696f685bd5c9141011f18c8072f84d31ca20c748546e791", size = 12081810, upload-time = "2026-02-23T15:44:29.461Z" }, + { url = "https://files.pythonhosted.org/packages/ea/5b/fad062a196c064cbc8564de5b2f4d3cb6315f852e3b31e8a1ce74c69a1ea/pyrefly-0.54.0-py3-none-win_arm64.whl", hash = "sha256:f06ab371356c7b1925e0bffe193b738797e71e5dbbff7fb5a13f90ee7521211d", size = 11564930, upload-time = "2026-02-23T15:44:33.053Z" }, +] + +[[package]] +name = "pyright" +version = "1.1.408" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "nodeenv" }, + { name = "typing-extensions" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/74/b2/5db700e52554b8f025faa9c3c624c59f1f6c8841ba81ab97641b54322f16/pyright-1.1.408.tar.gz", hash = "sha256:f28f2321f96852fa50b5829ea492f6adb0e6954568d1caa3f3af3a5f555eb684", size = 4400578, upload-time = "2026-01-08T08:07:38.795Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/0c/82/a2c93e32800940d9573fb28c346772a14778b84ba7524e691b324620ab89/pyright-1.1.408-py3-none-any.whl", hash = "sha256:090b32865f4fdb1e0e6cd82bf5618480d48eecd2eb2e70f960982a3d9a4c17c1", size = 6399144, upload-time = "2026-01-08T08:07:37.082Z" }, +] + +[[package]] +name = "tomli" +version = "2.4.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/82/30/31573e9457673ab10aa432461bee537ce6cef177667deca369efb79df071/tomli-2.4.0.tar.gz", hash = "sha256:aa89c3f6c277dd275d8e243ad24f3b5e701491a860d5121f2cdd399fbb31fc9c", size = 17477, upload-time = "2026-01-11T11:22:38.165Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/3c/43/7389a1869f2f26dba52404e1ef13b4784b6b37dac93bac53457e3ff24ca3/tomli-2.4.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:920b1de295e72887bafa3ad9f7a792f811847d57ea6b1215154030cf131f16b1", size = 154894, upload-time = "2026-01-11T11:21:56.07Z" }, + { url = "https://files.pythonhosted.org/packages/e9/05/2f9bf110b5294132b2edf13fe6ca6ae456204f3d749f623307cbb7a946f2/tomli-2.4.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:7d6d9a4aee98fac3eab4952ad1d73aee87359452d1c086b5ceb43ed02ddb16b8", size = 149053, upload-time = "2026-01-11T11:21:57.467Z" }, + { url = "https://files.pythonhosted.org/packages/e8/41/1eda3ca1abc6f6154a8db4d714a4d35c4ad90adc0bcf700657291593fbf3/tomli-2.4.0-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:36b9d05b51e65b254ea6c2585b59d2c4cb91c8a3d91d0ed0f17591a29aaea54a", size = 243481, upload-time = "2026-01-11T11:21:58.661Z" }, + { url = "https://files.pythonhosted.org/packages/d2/6d/02ff5ab6c8868b41e7d4b987ce2b5f6a51d3335a70aa144edd999e055a01/tomli-2.4.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:1c8a885b370751837c029ef9bc014f27d80840e48bac415f3412e6593bbc18c1", size = 251720, upload-time = "2026-01-11T11:22:00.178Z" }, + { url = "https://files.pythonhosted.org/packages/7b/57/0405c59a909c45d5b6f146107c6d997825aa87568b042042f7a9c0afed34/tomli-2.4.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:8768715ffc41f0008abe25d808c20c3d990f42b6e2e58305d5da280ae7d1fa3b", size = 247014, upload-time = "2026-01-11T11:22:01.238Z" }, + { url = "https://files.pythonhosted.org/packages/2c/0e/2e37568edd944b4165735687cbaf2fe3648129e440c26d02223672ee0630/tomli-2.4.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:7b438885858efd5be02a9a133caf5812b8776ee0c969fea02c45e8e3f296ba51", size = 251820, upload-time = "2026-01-11T11:22:02.727Z" }, + { url = "https://files.pythonhosted.org/packages/5a/1c/ee3b707fdac82aeeb92d1a113f803cf6d0f37bdca0849cb489553e1f417a/tomli-2.4.0-cp312-cp312-win32.whl", hash = "sha256:0408e3de5ec77cc7f81960c362543cbbd91ef883e3138e81b729fc3eea5b9729", size = 97712, upload-time = "2026-01-11T11:22:03.777Z" }, + { url = "https://files.pythonhosted.org/packages/69/13/c07a9177d0b3bab7913299b9278845fc6eaaca14a02667c6be0b0a2270c8/tomli-2.4.0-cp312-cp312-win_amd64.whl", hash = "sha256:685306e2cc7da35be4ee914fd34ab801a6acacb061b6a7abca922aaf9ad368da", size = 108296, upload-time = "2026-01-11T11:22:04.86Z" }, + { url = "https://files.pythonhosted.org/packages/18/27/e267a60bbeeee343bcc279bb9e8fbed0cbe224bc7b2a3dc2975f22809a09/tomli-2.4.0-cp312-cp312-win_arm64.whl", hash = "sha256:5aa48d7c2356055feef06a43611fc401a07337d5b006be13a30f6c58f869e3c3", size = 94553, upload-time = "2026-01-11T11:22:05.854Z" }, + { url = "https://files.pythonhosted.org/packages/23/d1/136eb2cb77520a31e1f64cbae9d33ec6df0d78bdf4160398e86eec8a8754/tomli-2.4.0-py3-none-any.whl", hash = "sha256:1f776e7d669ebceb01dee46484485f43a4048746235e683bcdffacdf1fb4785a", size = 14477, upload-time = "2026-01-11T11:22:37.446Z" }, +] + +[[package]] +name = "tomlkit" +version = "0.14.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/c3/af/14b24e41977adb296d6bd1fb59402cf7d60ce364f90c890bd2ec65c43b5a/tomlkit-0.14.0.tar.gz", hash = "sha256:cf00efca415dbd57575befb1f6634c4f42d2d87dbba376128adb42c121b87064", size = 187167, upload-time = "2026-01-13T01:14:53.304Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/b5/11/87d6d29fb5d237229d67973a6c9e06e048f01cf4994dee194ab0ea841814/tomlkit-0.14.0-py3-none-any.whl", hash = "sha256:592064ed85b40fa213469f81ac584f67a4f2992509a7c3ea2d632208623a3680", size = 39310, upload-time = "2026-01-13T01:14:51.965Z" }, +] + +[[package]] +name = "typing-conformance" +version = "0.1.0" +source = { virtual = "." } +dependencies = [ + { name = "mypy" }, + { name = "pyrefly" }, + { name = "pyright" }, + { name = "tomli" }, + { name = "tomlkit" }, + { name = "zuban" }, +] + +[package.metadata] +requires-dist = [ + { name = "mypy" }, + { name = "pyrefly" }, + { name = "pyright" }, + { name = "tomli" }, + { name = "tomlkit" }, + { name = "zuban" }, +] + +[[package]] +name = "typing-extensions" +version = "4.15.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/72/94/1a15dd82efb362ac84269196e94cf00f187f7ed21c242792a923cdb1c61f/typing_extensions-4.15.0.tar.gz", hash = "sha256:0cea48d173cc12fa28ecabc3b837ea3cf6f38c6d1136f85cbaaf598984861466", size = 109391, upload-time = "2025-08-25T13:49:26.313Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/18/67/36e9267722cc04a6b9f15c7f3441c2363321a3ea07da7ae0c0707beb2a9c/typing_extensions-4.15.0-py3-none-any.whl", hash = "sha256:f0fa19c6845758ab08074a0cfa8b7aecb71c999ca73d62883bc25cc018c4e548", size = 44614, upload-time = "2025-08-25T13:49:24.86Z" }, +] + +[[package]] +name = "zuban" +version = "0.6.1" +source = { registry = "https://pypi.org/simple" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/a7/91/2e3f5f095ff45c8052e320b99359ec03b266df1eedd3ea4ab4a2d68b134d/zuban-0.6.1-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:bf3ed1b85cedafaf51e51527bdc2ae089db121546aaa96a252beb0708a7f4306", size = 11186573, upload-time = "2026-02-25T02:04:49.434Z" }, + { url = "https://files.pythonhosted.org/packages/77/44/fc318d17c500ba0b1733b8d661d33acb117aaf6b20d9e2a74ce7a33de18d/zuban-0.6.1-py3-none-macosx_11_0_arm64.whl", hash = "sha256:e9e310e27eaa6c2184f3b50fbea6cd3cc0776549868837145d3156352156bb6c", size = 10925136, upload-time = "2026-02-25T02:04:52.562Z" }, + { url = "https://files.pythonhosted.org/packages/46/86/56a04bea43584b01d438b943bf1501b33a71db746183ab9b5cfa3818a2de/zuban-0.6.1-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e1d78ad0af5b4b44d4201e1f1add0b5495da813593b57ecfb39a5a526f998602", size = 27757976, upload-time = "2026-02-25T02:04:56.017Z" }, + { url = "https://files.pythonhosted.org/packages/83/9f/c5cd3d5c130603116b1614e013a1feac2ee7a804622aa5830a35d97b1dc5/zuban-0.6.1-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:a9d86ac6f23cf020978a94e47054af92ac3c26a7f884c27eb4fb28361a907bd6", size = 27883668, upload-time = "2026-02-25T02:04:59.839Z" }, + { url = "https://files.pythonhosted.org/packages/f8/09/5da69bc26fdce24b1a89c0e35d7134cd60960374e7aa48851b2d989447ad/zuban-0.6.1-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:66ede8809b0231b050d543004ac27dd031dc9053839337006fad18157e3e5440", size = 29237524, upload-time = "2026-02-25T02:05:03.86Z" }, + { url = "https://files.pythonhosted.org/packages/d3/6d/a7b8a8531495e64e27a8c4a25bfd7865f7d94c82c1d549c103bc5bf3bbc1/zuban-0.6.1-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:859e8917ed579e9018de6f6e4bb8a2ec6204df95bcf9ff9165c3067257ff3f05", size = 30224734, upload-time = "2026-02-25T02:05:07.586Z" }, + { url = "https://files.pythonhosted.org/packages/04/9a/0b963861ea2e594ab3669245825dde90ff3a25d6a916a48007be3b0f7db9/zuban-0.6.1-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:a07738374ddfca72fdf925cd275a3216a6fe8373bf91b49931c1c9f87561b729", size = 28034025, upload-time = "2026-02-25T02:05:12.99Z" }, + { url = "https://files.pythonhosted.org/packages/21/5d/5c588e77087fc649e84b409ac11c8b8ba48ee49a554531647af5b044a6c1/zuban-0.6.1-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:619815ac6cb9f48c9891cd4150cf3bce70a79c9a15fc349a0f860a3d9e44acf9", size = 28484806, upload-time = "2026-02-25T02:05:16.224Z" }, + { url = "https://files.pythonhosted.org/packages/3e/0b/4c67a559c0f9d405ca87685b65b16243e555c1d3c3c613d6fbb284c9b16a/zuban-0.6.1-py3-none-musllinux_1_2_i686.whl", hash = "sha256:f912f2db095e5715b757c31d73cef3509ba6da5ba99295d36b166420e9884992", size = 29355542, upload-time = "2026-02-25T02:05:20.097Z" }, + { url = "https://files.pythonhosted.org/packages/65/a2/8a38a910f40a090effbcc65e0272a7d33b16149b452f74a67b5537ba5f2f/zuban-0.6.1-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:80a9f18aa327378846258b06277f9f7bba7127513aa591ad8b9b28bb48f4e3b8", size = 28658304, upload-time = "2026-02-25T02:05:24.106Z" }, + { url = "https://files.pythonhosted.org/packages/1c/50/65a34b02e162845155efea4f393761634f7f39311d3b59249c9c7f3f53f7/zuban-0.6.1-py3-none-win32.whl", hash = "sha256:7737d566cb4202ea5c37e1f03397dcfbd437d1f33e6ee4090a0d2941383531c5", size = 9734143, upload-time = "2026-02-25T02:05:27.409Z" }, + { url = "https://files.pythonhosted.org/packages/37/45/2724c34fa769cf2cb29c9c178166b1689e936f810eb55f799e87a6acb248/zuban-0.6.1-py3-none-win_amd64.whl", hash = "sha256:9494dac40d4a23f92d7833e8fb15e8925e2c5d2561bc4edb18277ff35bea5ac8", size = 10490401, upload-time = "2026-02-25T02:05:29.817Z" }, +] From b88dedaebcaf4ae499174d5a952bb127c45f2a91 Mon Sep 17 00:00:00 2001 From: Jelle Zijlstra Date: Fri, 27 Feb 2026 21:34:34 -0800 Subject: [PATCH 2/3] Update generated conformance results --- conformance/results/mypy/generics_typevartuple_callable.toml | 4 +++- .../results/pyrefly/generics_typevartuple_callable.toml | 4 +++- .../results/pyright/generics_typevartuple_callable.toml | 4 +++- conformance/results/pyright/qualifiers_final_decorator.toml | 1 - conformance/results/results.html | 2 +- conformance/results/zuban/generics_typevartuple_callable.toml | 4 +++- 6 files changed, 13 insertions(+), 6 deletions(-) diff --git a/conformance/results/mypy/generics_typevartuple_callable.toml b/conformance/results/mypy/generics_typevartuple_callable.toml index 904ddc9f..81efe350 100644 --- a/conformance/results/mypy/generics_typevartuple_callable.toml +++ b/conformance/results/mypy/generics_typevartuple_callable.toml @@ -1,7 +1,9 @@ conformant = "Pass" output = """ generics_typevartuple_callable.py:26: error: Argument "target" to "Process" has incompatible type "Callable[[int, str], None]"; expected "Callable[[str, int], None]" [arg-type] +generics_typevartuple_callable.py:50: error: Expression is of type "tuple[complex, str, float]", not "tuple[float, str, complex]" [assert-type] """ -conformance_automated = "Pass" +conformance_automated = "Fail" errors_diff = """ +Line 50: Unexpected errors ['generics_typevartuple_callable.py:50: error: Expression is of type "tuple[complex, str, float]", not "tuple[float, str, complex]" [assert-type]'] """ diff --git a/conformance/results/pyrefly/generics_typevartuple_callable.toml b/conformance/results/pyrefly/generics_typevartuple_callable.toml index 4c3a32c0..552f9eed 100644 --- a/conformance/results/pyrefly/generics_typevartuple_callable.toml +++ b/conformance/results/pyrefly/generics_typevartuple_callable.toml @@ -1,7 +1,9 @@ conformant = "Pass" -conformance_automated = "Pass" +conformance_automated = "Fail" errors_diff = """ +Line 50: Unexpected errors ['assert_type(tuple[complex, str, float], tuple[float, str, complex]) failed [assert-type]'] """ output = """ ERROR generics_typevartuple_callable.py:26:28-35: Argument `tuple[Literal[''], Literal[0]]` is not assignable to parameter `args` with type `tuple[int, str]` in function `Process.__init__` [bad-argument-type] +ERROR generics_typevartuple_callable.py:50:16-63: assert_type(tuple[complex, str, float], tuple[float, str, complex]) failed [assert-type] """ diff --git a/conformance/results/pyright/generics_typevartuple_callable.toml b/conformance/results/pyright/generics_typevartuple_callable.toml index fb569c88..bc4d7952 100644 --- a/conformance/results/pyright/generics_typevartuple_callable.toml +++ b/conformance/results/pyright/generics_typevartuple_callable.toml @@ -3,7 +3,9 @@ output = """ generics_typevartuple_callable.py:26:28 - error: Argument of type "tuple[Literal[''], Literal[0]]" cannot be assigned to parameter "args" of type "tuple[*Ts@__init__]" in function "__init__"   "Literal['']" is not assignable to "int"   "Literal[0]" is not assignable to "str" (reportArgumentType) +generics_typevartuple_callable.py:50:17 - error: "assert_type" mismatch: expected "tuple[float, str, complex]" but received "tuple[complex, str, float]" (reportAssertTypeFailure) """ -conformance_automated = "Pass" +conformance_automated = "Fail" errors_diff = """ +Line 50: Unexpected errors ['generics_typevartuple_callable.py:50:17 - error: "assert_type" mismatch: expected "tuple[float, str, complex]" but received "tuple[complex, str, float]" (reportAssertTypeFailure)'] """ diff --git a/conformance/results/pyright/qualifiers_final_decorator.toml b/conformance/results/pyright/qualifiers_final_decorator.toml index 36b1e38b..94448af4 100644 --- a/conformance/results/pyright/qualifiers_final_decorator.toml +++ b/conformance/results/pyright/qualifiers_final_decorator.toml @@ -1,6 +1,5 @@ conformant = "Pass" output = """ -qualifiers_final_decorator.py:8:6 - warning: Import "_qualifiers_final_decorator" could not be resolved from source (reportMissingModuleSource) qualifiers_final_decorator.py:21:16 - error: Base class "Base1" is marked final and cannot be subclassed (reportGeneralTypeIssues) qualifiers_final_decorator.py:56:9 - error: Method "method1" cannot override final method defined in class "Base2" (reportIncompatibleMethodOverride) qualifiers_final_decorator.py:60:9 - error: Method "method2" cannot override final method defined in class "Base2" (reportIncompatibleMethodOverride) diff --git a/conformance/results/results.html b/conformance/results/results.html index a99606a6..6f9f704e 100644 --- a/conformance/results/results.html +++ b/conformance/results/results.html @@ -385,7 +385,7 @@

Python Type System Conformance Test Results

     generics_typevartuple_callable Pass Pass -Pass +Unknown Pass      generics_typevartuple_concat diff --git a/conformance/results/zuban/generics_typevartuple_callable.toml b/conformance/results/zuban/generics_typevartuple_callable.toml index d18ba3c5..32e917db 100644 --- a/conformance/results/zuban/generics_typevartuple_callable.toml +++ b/conformance/results/zuban/generics_typevartuple_callable.toml @@ -1,6 +1,8 @@ -conformance_automated = "Pass" +conformance_automated = "Fail" errors_diff = """ +Line 50: Unexpected errors ['generics_typevartuple_callable.py:50: error: Expression is of type "tuple[complex, str, float]", not "tuple[float, str, complex]" [misc]'] """ output = """ generics_typevartuple_callable.py:26: error: Argument "args" to "Process" has incompatible type "tuple[str, int]"; expected "tuple[int, str]" [arg-type] +generics_typevartuple_callable.py:50: error: Expression is of type "tuple[complex, str, float]", not "tuple[float, str, complex]" [misc] """ From 1b7046065eb24ba0e409a84ea0bc984ff3f0549a Mon Sep 17 00:00:00 2001 From: Jelle Zijlstra Date: Fri, 27 Feb 2026 21:39:45 -0800 Subject: [PATCH 3/3] Fix incorrect test --- conformance/results/mypy/generics_typevartuple_callable.toml | 4 +--- .../results/pyrefly/generics_typevartuple_callable.toml | 4 +--- .../results/pyright/generics_typevartuple_callable.toml | 4 +--- conformance/results/results.html | 2 +- conformance/results/zuban/generics_typevartuple_callable.toml | 4 +--- conformance/tests/generics_typevartuple_callable.py | 4 ++-- 6 files changed, 7 insertions(+), 15 deletions(-) diff --git a/conformance/results/mypy/generics_typevartuple_callable.toml b/conformance/results/mypy/generics_typevartuple_callable.toml index 81efe350..904ddc9f 100644 --- a/conformance/results/mypy/generics_typevartuple_callable.toml +++ b/conformance/results/mypy/generics_typevartuple_callable.toml @@ -1,9 +1,7 @@ conformant = "Pass" output = """ generics_typevartuple_callable.py:26: error: Argument "target" to "Process" has incompatible type "Callable[[int, str], None]"; expected "Callable[[str, int], None]" [arg-type] -generics_typevartuple_callable.py:50: error: Expression is of type "tuple[complex, str, float]", not "tuple[float, str, complex]" [assert-type] """ -conformance_automated = "Fail" +conformance_automated = "Pass" errors_diff = """ -Line 50: Unexpected errors ['generics_typevartuple_callable.py:50: error: Expression is of type "tuple[complex, str, float]", not "tuple[float, str, complex]" [assert-type]'] """ diff --git a/conformance/results/pyrefly/generics_typevartuple_callable.toml b/conformance/results/pyrefly/generics_typevartuple_callable.toml index 552f9eed..4c3a32c0 100644 --- a/conformance/results/pyrefly/generics_typevartuple_callable.toml +++ b/conformance/results/pyrefly/generics_typevartuple_callable.toml @@ -1,9 +1,7 @@ conformant = "Pass" -conformance_automated = "Fail" +conformance_automated = "Pass" errors_diff = """ -Line 50: Unexpected errors ['assert_type(tuple[complex, str, float], tuple[float, str, complex]) failed [assert-type]'] """ output = """ ERROR generics_typevartuple_callable.py:26:28-35: Argument `tuple[Literal[''], Literal[0]]` is not assignable to parameter `args` with type `tuple[int, str]` in function `Process.__init__` [bad-argument-type] -ERROR generics_typevartuple_callable.py:50:16-63: assert_type(tuple[complex, str, float], tuple[float, str, complex]) failed [assert-type] """ diff --git a/conformance/results/pyright/generics_typevartuple_callable.toml b/conformance/results/pyright/generics_typevartuple_callable.toml index bc4d7952..fb569c88 100644 --- a/conformance/results/pyright/generics_typevartuple_callable.toml +++ b/conformance/results/pyright/generics_typevartuple_callable.toml @@ -3,9 +3,7 @@ output = """ generics_typevartuple_callable.py:26:28 - error: Argument of type "tuple[Literal[''], Literal[0]]" cannot be assigned to parameter "args" of type "tuple[*Ts@__init__]" in function "__init__"   "Literal['']" is not assignable to "int"   "Literal[0]" is not assignable to "str" (reportArgumentType) -generics_typevartuple_callable.py:50:17 - error: "assert_type" mismatch: expected "tuple[float, str, complex]" but received "tuple[complex, str, float]" (reportAssertTypeFailure) """ -conformance_automated = "Fail" +conformance_automated = "Pass" errors_diff = """ -Line 50: Unexpected errors ['generics_typevartuple_callable.py:50:17 - error: "assert_type" mismatch: expected "tuple[float, str, complex]" but received "tuple[complex, str, float]" (reportAssertTypeFailure)'] """ diff --git a/conformance/results/results.html b/conformance/results/results.html index 6f9f704e..a99606a6 100644 --- a/conformance/results/results.html +++ b/conformance/results/results.html @@ -385,7 +385,7 @@

Python Type System Conformance Test Results

     generics_typevartuple_callable Pass Pass -Unknown +Pass Pass      generics_typevartuple_concat diff --git a/conformance/results/zuban/generics_typevartuple_callable.toml b/conformance/results/zuban/generics_typevartuple_callable.toml index 32e917db..d18ba3c5 100644 --- a/conformance/results/zuban/generics_typevartuple_callable.toml +++ b/conformance/results/zuban/generics_typevartuple_callable.toml @@ -1,8 +1,6 @@ -conformance_automated = "Fail" +conformance_automated = "Pass" errors_diff = """ -Line 50: Unexpected errors ['generics_typevartuple_callable.py:50: error: Expression is of type "tuple[complex, str, float]", not "tuple[float, str, complex]" [misc]'] """ output = """ generics_typevartuple_callable.py:26: error: Argument "args" to "Process" has incompatible type "tuple[str, int]"; expected "tuple[int, str]" [arg-type] -generics_typevartuple_callable.py:50: error: Expression is of type "tuple[complex, str, float]", not "tuple[float, str, complex]" [misc] """ diff --git a/conformance/tests/generics_typevartuple_callable.py b/conformance/tests/generics_typevartuple_callable.py index 11e59657..b8a9f577 100644 --- a/conformance/tests/generics_typevartuple_callable.py +++ b/conformance/tests/generics_typevartuple_callable.py @@ -42,9 +42,9 @@ def callback2(a: int, d: str) -> tuple[str]: assert_type(func2(callback2), tuple[str]) -def func3(*args: * tuple[int, *Ts, T]) -> tuple[T, *Ts]: +def func3(*args: *tuple[int, *Ts, T]) -> tuple[T, *Ts]: raise NotImplementedError def has_int_and_str(a: int, b: str, c: float, d: complex): - assert_type(func3(a, b, c, d), tuple[float, str, complex]) + assert_type(func3(a, b, c, d), tuple[complex, str, float])