Skip to content

Commit 93eec95

Browse files
committed
Merge branch 'main' into overload
2 parents 7d7a176 + cf943cc commit 93eec95

449 files changed

Lines changed: 8422 additions & 3151 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
conformance/results/results.html linguist-generated

.github/workflows/build-docs.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,14 @@ jobs:
1313
runs-on: ubuntu-latest
1414

1515
steps:
16-
- uses: actions/checkout@v6
16+
- uses: actions/checkout@v7
1717
- name: Set up Python
18-
uses: actions/setup-python@v6
18+
uses: actions/setup-python@v7
1919
with:
20-
python-version: 3.9
20+
python-version: "3.14"
2121
- name: Install dependencies
2222
run: |
2323
pip install --upgrade pip
24-
pip install -r docs/requirements.txt
24+
pip install --group docs
2525
- name: Build the documentation
2626
run: make -C docs html

.github/workflows/ci.yml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,18 +14,16 @@ jobs:
1414
runs-on: ubuntu-latest
1515

1616
steps:
17-
- uses: actions/checkout@v6
18-
- name: Set up Python 3
19-
uses: actions/setup-python@v6
17+
- uses: actions/checkout@v7
18+
- uses: actions/setup-python@v7
2019
with:
21-
python-version: 3
20+
python-version: "3.14"
2221
cache: "pip"
23-
cache-dependency-path: "test-requirements.txt"
2422

2523
- name: Install dependencies
2624
run: |
2725
pip install --upgrade pip
28-
pip install -r test-requirements.txt
26+
pip install --group test
2927
3028
- name: Lint implementation
3129
run: flake8

.github/workflows/conformance.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ jobs:
1313
runs-on: ubuntu-latest
1414

1515
steps:
16-
- uses: actions/checkout@v6
16+
- uses: actions/checkout@v7
1717

1818
- name: Set up Python 3.12
19-
uses: actions/setup-python@v6
19+
uses: actions/setup-python@v7
2020
with:
2121
python-version: "3.12"
2222
cache: "pip"

.readthedocs.yaml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,17 @@
44
version: 2
55

66
build:
7-
os: ubuntu-22.04
7+
os: ubuntu-26.04
88
tools:
99
python: "3"
10+
jobs:
11+
install:
12+
- uv sync --group docs
1013

1114
sphinx:
1215
configuration: docs/conf.py
1316

1417
python:
1518
install:
16-
- requirements: docs/requirements.txt
19+
- method: uv
20+
command: sync

conformance/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ Note that some type checkers may not run on some platforms. If a type checker fa
8181

8282
Different type checkers report errors in different ways (with different wording in error messages and different line numbers or character ranges for errors). This variation makes it difficult to fully automate test validation given that tests will want to check for both false positive and false negative type errors. Some level of manual inspection will therefore be needed to determine whether a type checker is fully conformant with all tests in any given test file. This "scoring" process is required only when the output of a test changes — e.g. when a new version of that type checker is released and the tests are rerun. We assume that the output of a type checker will be the same from one run to the next unless/until a new version is released that fixes or introduces a bug. In this case, the output will need to be manually inspected and the conformance results re-scored for those tests whose output has changed.
8383

84-
[Conformance results](https://htmlpreview.github.io/?https://github.com/python/typing/blob/main/conformance/results/results.html) are reported and summarized for each supported type checker. Currently, results are reported for mypy, pyrefly, pyright, zuban and ty. It is the goal and desire to add additional type checkers over time.
84+
[Conformance results](https://htmlpreview.github.io/?https://github.com/python/typing/blob/main/conformance/results/results.html) are reported and summarized for each supported type checker. Currently, results are reported for mypy, pyrefly, pyright, zuban, ty, and pycroscope. It is the goal and desire to add additional type checkers over time.
8585

8686
## Adding a New Test Case
8787

conformance/pyproject.toml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,17 @@ name = "typing-conformance"
33
version = "0.1.0"
44
requires-python = "==3.12.*"
55
dependencies = [
6+
"jinja2",
7+
"markdown",
68
"mypy",
7-
"pyrefly",
9+
"pycroscope",
10+
"pyrefly==1.3.0.dev1",
811
"pyright",
9-
"tomli",
1012
"tomlkit",
11-
"zuban",
1213
"ty",
14+
"types-markdown",
15+
"typing-extensions>=4.16.0",
16+
"zuban",
1317
]
1418

1519
[tool.uv]

conformance/results/mypy/aliases_typealiastype.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
conformant = "Partial"
22
notes = """
3-
Incorrectly rejects some recursive type aliases using TypeAliasType.
4-
Incorrectly rejects the use of a class-scoped TypeVar in a TypeAliasType definition.
3+
Incorrectly rejects some recursive type aliases using `TypeAliasType`.
4+
Incorrectly rejects the use of a class-scoped `TypeVar` in a `TypeAliasType` definition.
55
"""
66
output = """
77
aliases_typealiastype.py:20: error: Cannot resolve name "GoodAlias5" (possible cyclic definition) [misc]

conformance/results/mypy/annotations_forward_refs.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
conformant = "Partial"
22
notes = """
33
Does not report error for a forward reference that is not enclosed in quotes.
4-
Does not report error for use of quoted type with "|" operator (runtime error).
4+
Does not report error for use of quoted type with `|` operator (runtime error).
55
Incorrectly generates error for quoted type defined in class scope.
66
"""
77
output = """
@@ -22,7 +22,7 @@ annotations_forward_refs.py:53: error: Invalid type comment or annotation [vali
2222
annotations_forward_refs.py:54: error: Invalid type comment or annotation [valid-type]
2323
annotations_forward_refs.py:55: error: Module "types" is not valid as a type [valid-type]
2424
annotations_forward_refs.py:55: note: Perhaps you meant to use a protocol matching the module structure?
25-
annotations_forward_refs.py:80: error: Name "ClassF" is not defined [name-defined]
25+
annotations_forward_refs.py:80: error: Name "ClassF" is not defined; did you mean "ClassA", "ClassB", or "ClassC"? [name-defined]
2626
annotations_forward_refs.py:87: error: Function "annotations_forward_refs.ClassD.int" is not valid as a type [valid-type]
2727
annotations_forward_refs.py:87: note: Perhaps you need "Callable[...]" or a callback protocol?
2828
annotations_forward_refs.py:89: error: Function "annotations_forward_refs.ClassD.int" is not valid as a type [valid-type]

conformance/results/mypy/annotations_generators.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
conformant = "Partial"
22
notes = """
3-
Does not report incompatible Generator type in `yield from` statement.
3+
Does not report incompatible `Generator` type in `yield from` statement.
44
"""
55
output = """
66
annotations_generators.py:51: error: Missing return statement [return]

0 commit comments

Comments
 (0)