Skip to content

Commit 09ea9f4

Browse files
Merge branch 'main' into conformance-override-init-new-2222
2 parents d168b1d + 7c607df commit 09ea9f4

52 files changed

Lines changed: 320 additions & 276 deletions

Some content is hidden

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

.github/workflows/build-docs.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ jobs:
1717
- name: Set up Python
1818
uses: actions/setup-python@v6
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: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,15 @@ jobs:
1515

1616
steps:
1717
- uses: actions/checkout@v6
18-
- name: Set up Python 3
19-
uses: actions/setup-python@v6
18+
- uses: actions/setup-python@v6
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

.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/results/mypy/constructors_callable.toml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,9 @@ constructors_callable.py:145: error: Expression is of type "Class6Any", not "Any
4343
constructors_callable.py:145: error: Too few arguments [call-arg]
4444
constructors_callable.py:164: note: Revealed type is "Overload(def (x: int) -> constructors_callable.Class7[int], def (x: str) -> constructors_callable.Class7[str])"
4545
constructors_callable.py:184: note: Revealed type is "def [T] (x: list[T], y: list[T]) -> constructors_callable.Class8[T]"
46-
constructors_callable.py:186: error: Cannot infer function type argument [misc]
47-
constructors_callable.py:195: note: Revealed type is "def [T] (x: list[T], y: list[T]) -> constructors_callable.Class9"
48-
constructors_callable.py:197: error: Cannot infer function type argument [misc]
46+
constructors_callable.py:185: error: Argument 2 has incompatible type "str"; expected "list[str]" [arg-type]
47+
constructors_callable.py:187: error: Cannot infer function type argument [misc]
48+
constructors_callable.py:196: note: Revealed type is "def [T] (x: list[T], y: list[T]) -> constructors_callable.Class9"
49+
constructors_callable.py:197: error: Argument 2 has incompatible type "str"; expected "list[str]" [arg-type]
50+
constructors_callable.py:199: error: Cannot infer function type argument [misc]
4951
"""

conformance/results/mypy/generics_basic.toml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,13 @@ generics_basic.py:208: error: Dynamic metaclass not supported for "GenericMetaIn
1616
generics_basic.py:208: error: Type variable "generics_basic.T" is unbound [valid-type]
1717
generics_basic.py:208: note: (Hint: Use "Generic[T]" or "Protocol[T]" base class to bind "T" inside a class)
1818
generics_basic.py:208: note: (Hint: Use "T" in function signature to bind "T" inside a function)
19+
generics_basic.py:223: error: Argument 2 to "takes_two_lists" has incompatible type "str"; expected "list[int]" [arg-type]
20+
generics_basic.py:225: error: Cannot infer value of type parameter "T" of "takes_two_lists" [misc]
21+
generics_basic.py:232: error: Cannot infer value of type parameter "T" of "takes_two_lists" [misc]
22+
generics_basic.py:240: error: Argument 2 to "takes_two_int_lists" has incompatible type "str"; expected "list[int]" [arg-type]
23+
generics_basic.py:241: error: Cannot infer value of type parameter "T_int" of "takes_two_int_lists" [misc]
24+
generics_basic.py:244: error: Cannot infer value of type parameter "T_int" of "takes_two_int_lists" [misc]
25+
generics_basic.py:251: error: Cannot infer value of type parameter "T_int" of "takes_two_int_lists" [misc]
1926
"""
2027
conformance_automated = "Pass"
2128
errors_diff = """

conformance/results/pycroscope/constructors_callable.toml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,9 @@ output = """
2121
./constructors_callable.py:146:0: Takes 0 positional arguments but 1 were given [incompatible_call]
2222
./constructors_callable.py:164:4: Revealed type is '(x: ~_Ctor_Class7_T) -> ./constructors_callable.py.Class7[~_Ctor_Class7_T]' [reveal_type]
2323
./constructors_callable.py:184:12: Revealed type is '(x: list[~T@./constructors_callable.py.Class8], y: list[~T@./constructors_callable.py.Class8]) -> ./constructors_callable.py.Class8[~T@./constructors_callable.py.Class8]' [reveal_type]
24-
./constructors_callable.py:186:0: Cannot resolve type variables [incompatible_call]
25-
./constructors_callable.py:195:12: Revealed type is '(x: list[~T@./constructors_callable.py.Class9.__init__.<locals>.__init__], y: list[~T@./constructors_callable.py.Class9.__init__.<locals>.__init__]) -> ./constructors_callable.py.Class9' [reveal_type]
26-
./constructors_callable.py:197:0: Cannot resolve type variables [incompatible_call]
24+
./constructors_callable.py:185:9: Incompatible argument type for y: expected list[~T@./constructors_callable.py.Class8] but got Literal['not a list'] [incompatible_argument]
25+
./constructors_callable.py:187:0: Cannot resolve type variables [incompatible_call]
26+
./constructors_callable.py:196:12: Revealed type is '(x: list[~T@./constructors_callable.py.Class9.__init__.<locals>.__init__], y: list[~T@./constructors_callable.py.Class9.__init__.<locals>.__init__]) -> ./constructors_callable.py.Class9' [reveal_type]
27+
./constructors_callable.py:197:9: Incompatible argument type for y: expected list[~T@./constructors_callable.py.Class9.__init__.<locals>.__init__] but got Literal['not a list'] [incompatible_argument]
28+
./constructors_callable.py:199:0: Cannot resolve type variables [incompatible_call]
2729
"""

conformance/results/pycroscope/generics_basic.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,10 @@ output = """
1515
./generics_basic.py:171:27: All type parameters for the class must appear within Generic or Protocol [invalid_base]
1616
./generics_basic.py:172:27: All type parameters for the class must appear within Generic or Protocol [invalid_base]
1717
./generics_basic.py:208:36: Cannot determine metaclass [invalid_metaclass]
18+
./generics_basic.py:223:21: Incompatible argument type for y: expected list[~T@./generics_basic.py.takes_two_lists.<locals>.takes_two_lists] but got Literal['not a list'] [incompatible_argument]
19+
./generics_basic.py:225:0: Cannot resolve type variables [incompatible_call]
20+
./generics_basic.py:232:4: Cannot resolve type variables [incompatible_call]
21+
./generics_basic.py:240:25: Incompatible argument type for y: expected list[~T_int@./generics_basic.py.takes_two_int_lists.<locals>.takes_two_int_lists] but got Literal['not a list'] [incompatible_argument]
22+
./generics_basic.py:241:25: Incompatible argument type for y: expected list[~T_int@./generics_basic.py.takes_two_int_lists.<locals>.takes_two_int_lists] but got Literal[['']] [incompatible_argument]
23+
./generics_basic.py:251:4: Cannot resolve type variables [incompatible_call]
1824
"""

conformance/results/pyrefly/aliases_implicit.toml

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,5 @@
1-
conformant = "Partial"
2-
notes = """
3-
Does not reject invalid syntax in implicit type aliases.
4-
"""
5-
conformance_automated = "Fail"
1+
conformance_automated = "Pass"
62
errors_diff = """
7-
Line 106: Expected 1 errors
8-
Line 111: Expected 1 errors
9-
Line 112: Expected 1 errors
10-
Line 113: Expected 1 errors
11-
Line 117: Expected 1 errors
123
"""
134
output = """
145
ERROR aliases_implicit.py:76:9-28: `type[int | None]` is not subscriptable [unsupported-operation]
@@ -17,14 +8,26 @@ ERROR aliases_implicit.py:78:9-33: Expected 1 type argument for `GoodTypeAlias4`
178
ERROR aliases_implicit.py:79:9-33: Expected 1 type argument for `GoodTypeAlias8`, got 2 [bad-specialization]
189
ERROR aliases_implicit.py:80:9-33: Expected a valid ParamSpec expression, got `int` [invalid-param-spec]
1910
ERROR aliases_implicit.py:81:9-29: `str` is not assignable to upper bound `float` of type variable `TFloat` [bad-specialization]
11+
ERROR aliases_implicit.py:106:9-22: `BadTypeAlias1` is not a valid type alias: Function call cannot be used in annotations [invalid-annotation]
2012
ERROR aliases_implicit.py:107:9-22: Expected a type form, got instance of `list[type[int] | type[str]]` [not-a-type]
13+
ERROR aliases_implicit.py:107:9-22: `BadTypeAlias2` is not a valid type alias: List literal cannot be used in annotations [invalid-annotation]
2114
ERROR aliases_implicit.py:108:9-22: Expected a type form, got instance of `tuple[tuple[type[int], type[str]]]` [not-a-type]
15+
ERROR aliases_implicit.py:108:9-22: `BadTypeAlias3` is not a valid type alias: Tuple literal cannot be used in annotations [invalid-annotation]
2216
ERROR aliases_implicit.py:109:9-22: Expected a type form, got instance of `list[type[int]]` [not-a-type]
17+
ERROR aliases_implicit.py:109:9-22: `BadTypeAlias4` is not a valid type alias: List comprehension cannot be used in annotations [invalid-annotation]
2318
ERROR aliases_implicit.py:110:9-22: Expected a type form, got instance of `dict[str, str]` [not-a-type]
19+
ERROR aliases_implicit.py:110:9-22: `BadTypeAlias5` is not a valid type alias: Dict literal cannot be used in annotations [invalid-annotation]
20+
ERROR aliases_implicit.py:111:9-22: `BadTypeAlias6` is not a valid type alias: Function call cannot be used in annotations [invalid-annotation]
21+
ERROR aliases_implicit.py:112:9-22: `BadTypeAlias7` is not a valid type alias: Invalid subscript expression cannot be used in annotations [invalid-annotation]
22+
ERROR aliases_implicit.py:113:9-22: `BadTypeAlias8` is not a valid type alias: If expression cannot be used in annotations [invalid-annotation]
2423
ERROR aliases_implicit.py:114:9-22: Expected a type form, got instance of `Literal[3]` [not-a-type]
2524
ERROR aliases_implicit.py:115:10-24: Expected a type form, got instance of `Literal[True]` [not-a-type]
25+
ERROR aliases_implicit.py:115:10-24: `BadTypeAlias10` is not a valid type alias: Bool literal cannot be used in annotations [invalid-annotation]
2626
ERROR aliases_implicit.py:116:10-24: Expected a type form, got instance of `Literal[1]` [not-a-type]
27+
ERROR aliases_implicit.py:116:10-24: `BadTypeAlias11` is not a valid type alias: Number literal cannot be used in annotations [invalid-annotation]
28+
ERROR aliases_implicit.py:117:10-24: `BadTypeAlias12` is not a valid type alias: Boolean operation cannot be used in annotations [invalid-annotation]
2729
ERROR aliases_implicit.py:118:10-24: Expected a type form, got instance of `Literal['int']` [not-a-type]
30+
ERROR aliases_implicit.py:118:10-24: `BadTypeAlias13` is not a valid type alias: F-string cannot be used in annotations [invalid-annotation]
2831
ERROR aliases_implicit.py:119:10-24: Expected a type form, got instance of `Literal['int | str']` [not-a-type]
2932
ERROR aliases_implicit.py:133:6-20: Expected a callable, got `type[list[Unknown] | set[Unknown]]` [not-callable]
3033
ERROR aliases_implicit.py:135:5-24: `type[list[Unknown] | set[Unknown]]` is not subscriptable [unsupported-operation]

conformance/results/pyrefly/annotations_forward_refs.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ Line 87: Unexpected errors ['Expected a type form, got instance of `(self: Self@
99
Line 96: Unexpected errors ['assert_type(Unknown, int) failed [assert-type]']
1010
"""
1111
output = """
12+
ERROR annotations_forward_refs.py:23:12-18: `ClassA` is uninitialized [unbound-name]
1213
ERROR annotations_forward_refs.py:24:7-21: `|` union syntax does not work with string literals [invalid-annotation]
1314
ERROR annotations_forward_refs.py:25:7-21: `|` union syntax does not work with string literals [invalid-annotation]
1415
ERROR annotations_forward_refs.py:41:10-50: Function call cannot be used in annotations [invalid-annotation]
@@ -20,6 +21,7 @@ ERROR annotations_forward_refs.py:46:10-26: Function call cannot be used in anno
2021
ERROR annotations_forward_refs.py:47:10-18: Invalid subscript expression cannot be used in annotations [invalid-annotation]
2122
ERROR annotations_forward_refs.py:48:10-31: If expression cannot be used in annotations [invalid-annotation]
2223
ERROR annotations_forward_refs.py:49:10-14: Expected a type form, got instance of `Literal[1]` [not-a-type]
24+
ERROR annotations_forward_refs.py:49:10-14: `var1` is not a valid type alias: Number literal cannot be used in annotations [invalid-annotation]
2325
ERROR annotations_forward_refs.py:50:11-15: Bool literal cannot be used in annotations [invalid-annotation]
2426
ERROR annotations_forward_refs.py:51:11-12: Number literal cannot be used in annotations [invalid-annotation]
2527
ERROR annotations_forward_refs.py:52:11-13: Unary operation cannot be used in annotations [invalid-annotation]

conformance/results/pyrefly/annotations_typeexpr.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ ERROR annotations_typeexpr.py:93:9-24: Function call cannot be used in annotatio
1212
ERROR annotations_typeexpr.py:94:9-17: Invalid subscript expression cannot be used in annotations [invalid-annotation]
1313
ERROR annotations_typeexpr.py:95:9-30: If expression cannot be used in annotations [invalid-annotation]
1414
ERROR annotations_typeexpr.py:96:9-13: Expected a type form, got instance of `Literal[3]` [not-a-type]
15+
ERROR annotations_typeexpr.py:96:9-13: `var1` is not a valid type alias: Number literal cannot be used in annotations [invalid-annotation]
1516
ERROR annotations_typeexpr.py:97:10-14: Bool literal cannot be used in annotations [invalid-annotation]
1617
ERROR annotations_typeexpr.py:98:10-11: Number literal cannot be used in annotations [invalid-annotation]
1718
ERROR annotations_typeexpr.py:99:10-12: Unary operation cannot be used in annotations [invalid-annotation]

0 commit comments

Comments
 (0)