Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 4 additions & 7 deletions conformance/results/pyrefly/dataclasses_slots.toml
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
conformant = "Partial"
notes = """
__slots__ is generated but not checked during attribute assignment
"""
conformance_automated = "Fail"
conformant = "Pass"
conformance_automated = "Pass"
errors_diff = """
Line 25: Expected 1 errors
Line 38: Expected 1 errors
"""
output = """
ERROR dataclasses_slots.py:11:7-10: Cannot specify both `slots=True` and `__slots__` [bad-class-definition]
ERROR dataclasses_slots.py:25:14-15: Object of class `DC2` has no attribute `y` (not declared in `__slots__`) [missing-attribute]
ERROR dataclasses_slots.py:38:14-15: Object of class `DC3` has no attribute `y` (not declared in `__slots__`) [missing-attribute]
ERROR dataclasses_slots.py:66:1-14: Class `DC6` has no class attribute `__slots__` [missing-attribute]
ERROR dataclasses_slots.py:69:1-17: Object of class `DC6` has no attribute `__slots__` [missing-attribute]
"""
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ conformance_automated = "Pass"
errors_diff = """
"""
output = """
ERROR dataclasses_transform_converter.py:48:41-55: Argument `() -> int` is not assignable to parameter `converter` with type `(@_) -> int` in function `model_field` [bad-argument-type]
ERROR dataclasses_transform_converter.py:49:41-55: Argument `(*, x: int) -> int` is not assignable to parameter `converter` with type `(@_) -> int` in function `model_field` [bad-argument-type]
ERROR dataclasses_transform_converter.py:48:41-55: Argument `() -> int` is not assignable to parameter `converter` with type `(@_) -> @_` in function `model_field` [bad-argument-type]
ERROR dataclasses_transform_converter.py:49:41-55: Argument `(*, x: int) -> int` is not assignable to parameter `converter` with type `(@_) -> @_` in function `model_field` [bad-argument-type]
ERROR dataclasses_transform_converter.py:107:5-6: Argument `Literal[1]` is not assignable to parameter `field0` with type `str` in function `DC2.__init__` [bad-argument-type]
ERROR dataclasses_transform_converter.py:108:23-24: Argument `Literal[1]` is not assignable to parameter `field3` with type `bytes | str` in function `DC2.__init__` [bad-argument-type]
ERROR dataclasses_transform_converter.py:109:29-31: Argument `complex` is not assignable to parameter `field4` with type `list[str] | str` in function `DC2.__init__` [bad-argument-type]
Expand Down
28 changes: 14 additions & 14 deletions conformance/results/pyrefly/directives_deprecated.toml
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
conformant = "Pass"
conformance_automated = "Pass"
conformant = "Unsupported"
conformance_automated = "Fail"
errors_diff = """
Line 18: Expected 1 errors
Line 24: Expected 1 errors
Line 25: Expected 1 errors
Line 30: Expected 1 errors
Line 41: Expected 1 errors
Line 42: Expected 1 errors
Line 44: Expected 1 errors
Line 47: Expected 1 errors
Line 48: Expected 1 errors
Line 58: Expected 1 errors
Line 69: Expected 1 errors
Line 98: Expected 1 errors
"""
output = """
WARN directives_deprecated.py:18:44-47: `Ham` is deprecated [deprecated]
WARN directives_deprecated.py:24:1-23: `_directives_deprecated_library.norwegian_blue` is deprecated [deprecated]
WARN directives_deprecated.py:25:5-27: `_directives_deprecated_library.norwegian_blue` is deprecated [deprecated]
WARN directives_deprecated.py:30:12-15: Call to deprecated overload `_directives_deprecated_library.foo` [deprecated]
WARN directives_deprecated.py:41:5-13: `+` is not supported between `Spam` and `Literal[1]` [deprecated]
WARN directives_deprecated.py:42:1-10: `+=` is not supported between `Spam` and `Literal[1]` [deprecated]
WARN directives_deprecated.py:44:1-12: `_directives_deprecated_library.Spam.greasy` is deprecated [deprecated]
WARN directives_deprecated.py:47:1-11: `_directives_deprecated_library.Spam.shape` is deprecated [deprecated]
WARN directives_deprecated.py:48:1-11: `_directives_deprecated_library.Spam.shape` is deprecated [deprecated]
WARN directives_deprecated.py:58:1-10: `Invocable.__call__` is deprecated [deprecated]
WARN directives_deprecated.py:69:1-6: `lorem` is deprecated [deprecated]
WARN directives_deprecated.py:98:5-10: `SupportsFoo1.foo` is deprecated [deprecated]
"""
3 changes: 0 additions & 3 deletions conformance/results/pyrefly/generics_basic.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,9 @@ Spurious error for constrained type var call.
"""
conformance_automated = "Fail"
errors_diff = """
Line 34: Unexpected errors ['`+` is not supported between `AnyStr` and `AnyStr` [unsupported-operation]', '`+` is not supported between `AnyStr` and `AnyStr` [unsupported-operation]']
Line 44: Unexpected errors ['Argument `bytes` is not assignable to parameter `y` with type `str` in function `concat` [bad-argument-type]']
"""
output = """
ERROR generics_basic.py:34:12-17: `+` is not supported between `AnyStr` and `AnyStr` [unsupported-operation]
ERROR generics_basic.py:34:12-17: `+` is not supported between `AnyStr` and `AnyStr` [unsupported-operation]
ERROR generics_basic.py:40:15-16: Argument `bytes` is not assignable to parameter `y` with type `str` in function `concat` [bad-argument-type]
ERROR generics_basic.py:41:15-16: Argument `str` is not assignable to parameter `y` with type `bytes` in function `concat` [bad-argument-type]
ERROR generics_basic.py:44:15-16: Argument `bytes` is not assignable to parameter `y` with type `str` in function `concat` [bad-argument-type]
Expand Down
1 change: 0 additions & 1 deletion conformance/results/pyrefly/generics_syntax_scoping.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ output = """
ERROR generics_syntax_scoping.py:14:20-31: Type variable bounds and constraints must be concrete [invalid-annotation]
ERROR generics_syntax_scoping.py:18:26-27: Expected a type form, got instance of `int` [not-a-type]
ERROR generics_syntax_scoping.py:35:7-8: `T` is uninitialized [unbound-name]
ERROR generics_syntax_scoping.py:44:17-18: `T` is uninitialized [unbound-name]
ERROR generics_syntax_scoping.py:44:17-18: Expected a type form, got instance of `int` [not-a-type]
ERROR generics_syntax_scoping.py:92:17-18: Type parameter `T` shadows a type parameter of the same name from an enclosing scope [invalid-type-var]
ERROR generics_syntax_scoping.py:95:17-18: Type parameter `T` shadows a type parameter of the same name from an enclosing scope [invalid-type-var]
Expand Down
15 changes: 3 additions & 12 deletions conformance/results/pyrefly/generics_upper_bound.toml
Original file line number Diff line number Diff line change
@@ -1,19 +1,10 @@
conformance_automated = "Fail"
conformant = "Partial"
notes = """
Cannot find a common supertype of `list[int]` and `set[int]` in order to solve a type variable bound to `Sized`.
"""
conformance_automated = "Pass"
conformant = "Pass"
errors_diff = """
Lines 43, 44: Expected exactly one error (tag 'mixed-collections')
Line 43: Unexpected errors ['assert_type(list[int], list[int] | set[int]) failed [assert-type]', 'Argument `set[int]` is not assignable to parameter `y` with type `list[int]` in function `longer` [bad-argument-type]']
Line 44: Unexpected errors ['assert_type(list[int], Collection[int]) failed [assert-type]', 'Argument `set[int]` is not assignable to parameter `y` with type `list[int]` in function `longer` [bad-argument-type]']
"""
output = """
ERROR generics_upper_bound.py:24:38-45: Type variable bounds and constraints must be concrete [invalid-annotation]
ERROR generics_upper_bound.py:43:16-59: assert_type(list[int], list[int] | set[int]) failed [assert-type]
ERROR generics_upper_bound.py:43:31-35: Argument `set[int]` is not assignable to parameter `y` with type `list[int]` in function `longer` [bad-argument-type]
ERROR generics_upper_bound.py:44:16-54: assert_type(list[int], Collection[int]) failed [assert-type]
ERROR generics_upper_bound.py:44:31-35: Argument `set[int]` is not assignable to parameter `y` with type `list[int]` in function `longer` [bad-argument-type]
ERROR generics_upper_bound.py:44:16-54: assert_type(list[int] | set[int], Collection[int]) failed [assert-type]
ERROR generics_upper_bound.py:52:7-13: `int` is not assignable to upper bound `Sized` of type variable `ST` [bad-specialization]
ERROR generics_upper_bound.py:57:38-49: TypeVar cannot have both constraints and bound [invalid-type-var]
"""
4 changes: 2 additions & 2 deletions conformance/results/pyrefly/overloads_evaluation.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ errors_diff = """
"""
output = """
ERROR overloads_evaluation.py:38:11-13: No matching overload found for function `example1_1` called with arguments: () [no-matching-overload]
ERROR overloads_evaluation.py:46:11-17: No matching overload found for function `example1_1` called with arguments: (Literal[1], Literal[1]) [no-matching-overload]
ERROR overloads_evaluation.py:51:11-14: No matching overload found for function `example1_1` called with arguments: (Literal[1]) [no-matching-overload]
ERROR overloads_evaluation.py:46:15-16: Argument `Literal[1]` is not assignable to parameter `y` with type `str` in function `example1_1` [bad-argument-type]
ERROR overloads_evaluation.py:51:12-13: Argument `Literal[1]` is not assignable to parameter `x` with type `str` in function `example1_1` [bad-argument-type]
ERROR overloads_evaluation.py:116:13-22: No matching overload found for function `example2` called with arguments: (int | str, int | str, Literal[1]) [no-matching-overload]
"""
17 changes: 10 additions & 7 deletions conformance/results/pyrefly/protocols_variance.toml
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
conformant = "Pass"
conformance_automated = "Pass"
conformant = "Partial"
notes = """
Does not detect Protocol type parameters with wrong variance.
"""
conformance_automated = "Fail"
errors_diff = """
Line 21: Expected 1 errors
Line 40: Expected 1 errors
Line 56: Expected 1 errors
Line 66: Expected 1 errors
Line 104: Expected 1 errors
"""
output = """
WARN protocols_variance.py:21:7-17: Type variable `T1` in class `AnotherBox` is declared as invariant, but could be covariant based on its usage [variance-mismatch]
WARN protocols_variance.py:40:7-16: Type variable `T3` in class `Protocol2` is declared as invariant, but could be contravariant based on its usage [variance-mismatch]
WARN protocols_variance.py:56:7-16: Type variable `T1` in class `Protocol4` is declared as invariant, but could be contravariant based on its usage [variance-mismatch]
ERROR protocols_variance.py:62:9-11: Type variable `T1_co` is Covariant but is used in contravariant position [invalid-variance]
WARN protocols_variance.py:66:7-16: Type variable `T1` in class `Protocol6` is declared as invariant, but could be covariant based on its usage [variance-mismatch]
ERROR protocols_variance.py:72:9-11: Type variable `T1_contra` is Contravariant but is used in covariant position [invalid-variance]
WARN protocols_variance.py:104:7-17: Type variable `T1` in class `Protocol12` is declared as invariant, but could be covariant based on its usage [variance-mismatch]
"""
2 changes: 1 addition & 1 deletion conformance/results/pyrefly/typeddicts_extra_items.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ ERROR typeddicts_extra_items.py:256:13-22: `MovieExtraStr` is not assignable to
ERROR typeddicts_extra_items.py:257:13-22: `MovieExtraInt` is not assignable to variable `extra_str` with type `MovieExtraStr` [bad-assignment]
ERROR typeddicts_extra_items.py:268:14-24: `MovieNotClosed` is not assignable to variable `extra_int2` with type `MovieExtraInt` [bad-assignment]
ERROR typeddicts_extra_items.py:278:15-57: No matching overload found for function `NonClosedMovie.__init__` called with arguments: (name=Literal['No Country for Old Men'], year=Literal[2007]) [no-matching-overload]
ERROR typeddicts_extra_items.py:285:11-62: No matching overload found for function `ExtraMovie.__init__` called with arguments: (name=Literal['No Country for Old Men'], language=Literal['English']) [no-matching-overload]
ERROR typeddicts_extra_items.py:285:52-61: Keyword argument `language` with type `Literal['English']` is not assignable to kwargs type `int` in function `ExtraMovie.__init__` [bad-argument-type]
ERROR typeddicts_extra_items.py:293:12-54: No matching overload found for function `ClosedMovie.__init__` called with arguments: (name=Literal['No Country for Old Men'], year=Literal[2007]) [no-matching-overload]
ERROR typeddicts_extra_items.py:303:34-44: `MovieExtraInt` is not assignable to `Mapping[str, int]` [bad-assignment]
ERROR typeddicts_extra_items.py:352:25-52: `dict[str, int]` is not assignable to `IntDict` [bad-assignment]
Expand Down
2 changes: 1 addition & 1 deletion conformance/results/pyrefly/version.toml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
version = "pyrefly 0.56.0"
version = "pyrefly 0.58.0"
16 changes: 8 additions & 8 deletions conformance/results/results.html
Original file line number Diff line number Diff line change
Expand Up @@ -176,9 +176,9 @@ <h3>Python Type System Conformance Test Results</h3>
</th>
<th class='tc-header'><div class='tc-name'>pyright 1.1.408</div>
</th>
<th class='tc-header'><div class='tc-name'>zuban 0.6.1</div>
<th class='tc-header'><div class='tc-name'>zuban 0.6.2</div>
</th>
<th class='tc-header'><div class='tc-name'>pyrefly 0.56.0</div>
<th class='tc-header'><div class='tc-name'>pyrefly 0.58.0</div>
</th>
<th class='tc-header'><div class='tc-name'>ty 0.0.26</div>
</th>
Expand Down Expand Up @@ -227,7 +227,7 @@ <h3>Python Type System Conformance Test Results</h3>
<tr><th class="column col1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;typeforms_typeform</th>
<th class="column col2 partially-conformant"><div class="hover-text">Partial<span class="tooltip-text" id="bottom"><p>Does not support assigning Union and GenericAlias objects to their runtime types.</p></span></div></th>
<th class="column col2 not-conformant">Unsupported</th>
<th class="column col2 partially-conformant"><div class="hover-text">Partial<span class="tooltip-text" id="bottom"><p>TypeForm[Any] is not considered equivalent to itself.</p></span></div></th>
<th class="column col2 conformant">Pass</th>
<th class="column col2 not-conformant">Unsupported</th>
<th class="column col2 not-conformant">Unsupported</th>
</tr>
Expand Down Expand Up @@ -465,7 +465,7 @@ <h3>Python Type System Conformance Test Results</h3>
<th class="column col2 partially-conformant"><div class="hover-text">Partial<span class="tooltip-text" id="bottom"><p>Does not reject use of type variable within an upper bound.</p></span></div></th>
<th class="column col2 conformant">Pass</th>
<th class="column col2 conformant">Pass</th>
<th class="column col2 partially-conformant"><div class="hover-text">Partial<span class="tooltip-text" id="bottom"><p>Cannot find a common supertype of `list[int]` and `set[int]` in order to solve a type variable bound to `Sized`.</p></span></div></th>
<th class="column col2 conformant">Pass</th>
<th class="column col2 conformant">Pass</th>
</tr>
<tr><th class="column col1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;generics_variance</th>
Expand Down Expand Up @@ -683,7 +683,7 @@ <h3>Python Type System Conformance Test Results</h3>
<th class="column col2 conformant">Pass</th>
<th class="column col2 conformant">Pass</th>
<th class="column col2 conformant">Pass</th>
<th class="column col2 conformant">Pass</th>
<th class="column col2 partially-conformant"><div class="hover-text">Partial<span class="tooltip-text" id="bottom"><p>Does not detect Protocol type parameters with wrong variance.</p></span></div></th>
<th class="column col2 not-conformant">Unsupported</th>
</tr>
<tr><th class="column" colspan="6">
Expand Down Expand Up @@ -837,7 +837,7 @@ <h3>Python Type System Conformance Test Results</h3>
<tr><th class="column col1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;dataclasses_hash</th>
<th class="column col2 not-conformant"><div class="hover-text">Unsupported<span class="tooltip-text" id="bottom"><p>Does not synthesize `__hash__ = None` as a class attribute for unhashable dataclasses.</p><p>Does not report when an unhashable dataclass has `__hash__` called directly on an instance.</p><p>Does not report when dataclass is not compatible with Hashable protocol.</p></span></div></th>
<th class="column col2 conformant">Pass</th>
<th class="column col2 partially-conformant"><div class="hover-text">Partial<span class="tooltip-text" id="bottom"><p>Does not synthesize a `__hash__ = None` class attribute for unhashable dataclasses.</p></span></div></th>
<th class="column col2 conformant">Pass</th>
<th class="column col2 conformant">Pass</th>
<th class="column col2 partially-conformant"><div class="hover-text">Partial<span class="tooltip-text" id="bottom"><p>Understands the `Hashable` protocol as equivalent to `object`.</p></span></div></th>
</tr>
Expand Down Expand Up @@ -880,7 +880,7 @@ <h3>Python Type System Conformance Test Results</h3>
<th class="column col2 partially-conformant"><div class="hover-text">Partial<span class="tooltip-text" id="bottom"><p>Does not reject write to instance variable that is not defined in __slots__.</p></span></div></th>
<th class="column col2 conformant">Pass</th>
<th class="column col2 conformant">Pass</th>
<th class="column col2 partially-conformant"><div class="hover-text">Partial<span class="tooltip-text" id="bottom"><p>__slots__ is generated but not checked during attribute assignment</p></span></div></th>
<th class="column col2 conformant">Pass</th>
<th class="column col2 partially-conformant"><div class="hover-text">Partial<span class="tooltip-text" id="bottom"><p>Synthesizes a `__slots__` attribute but does not validate attribute assignments against `__slots__`.</p></span></div></th>
</tr>
<tr><th class="column col1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;dataclasses_transform_class</th>
Expand Down Expand Up @@ -1164,7 +1164,7 @@ <h3>Python Type System Conformance Test Results</h3>
<th class="column col2 conformant">Pass</th>
<th class="column col2 conformant">Pass</th>
<th class="column col2 conformant">Pass</th>
<th class="column col2 conformant">Pass</th>
<th class="column col2 not-conformant">Unsupported</th>
<th class="column col2 partially-conformant"><div class="hover-text">Partial<span class="tooltip-text" id="bottom"><p>Does not detect calls to deprecated overloads.</p><p>Does not detect implicit calls to deprecated dunder methods, for example via operators.</p><p>Does not detect accesses of, or attempts to set, deprecated properties.</p></span></div></th>
</tr>
<tr><th class="column col1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;directives_no_type_check</th>
Expand Down
19 changes: 8 additions & 11 deletions conformance/results/zuban/dataclasses_hash.toml
Original file line number Diff line number Diff line change
@@ -1,17 +1,14 @@
conformance_automated = "Fail"
conformant = "Partial"
notes = """
Does not synthesize a `__hash__ = None` class attribute for unhashable dataclasses.
"""
conformance_automated = "Pass"
conformant = "Pass"
errors_diff = """
Line 14: Unexpected errors ['dataclasses_hash.py:14: error: Expression is of type "Callable[[object], int]", not "None" [misc]']
Line 36: Unexpected errors ['dataclasses_hash.py:36: error: Expression is of type "Callable[[object], int]", not "None" [misc]']
"""
output = """
dataclasses_hash.py:14: error: Expression is of type "Callable[[object], int]", not "None" [misc]
dataclasses_hash.py:17: error: "DC1" has no attribute "__hash__" [attr-defined]
dataclasses_hash.py:17: error: "None" not callable [operator]
dataclasses_hash.py:18: error: Incompatible types in assignment (expression has type "DC1", variable has type "Hashable") [assignment]
dataclasses_hash.py:36: error: Expression is of type "Callable[[object], int]", not "None" [misc]
dataclasses_hash.py:39: error: "DC3" has no attribute "__hash__" [attr-defined]
dataclasses_hash.py:18: note: Following member(s) of "DC1" have conflicts:
dataclasses_hash.py:18: note: __hash__: expected "Callable[[], int]", got "None"
dataclasses_hash.py:39: error: "None" not callable [operator]
dataclasses_hash.py:40: error: Incompatible types in assignment (expression has type "DC3", variable has type "Hashable") [assignment]
dataclasses_hash.py:40: note: Following member(s) of "DC3" have conflicts:
dataclasses_hash.py:40: note: __hash__: expected "Callable[[], int]", got "None"
"""
9 changes: 2 additions & 7 deletions conformance/results/zuban/typeforms_typeform.toml
Original file line number Diff line number Diff line change
@@ -1,15 +1,10 @@
conformant = "Partial"
notes = """
TypeForm[Any] is not considered equivalent to itself.
"""
conformance_automated = "Fail"
conformant = "Pass"
conformance_automated = "Pass"
errors_diff = """
Line 41: Unexpected errors ['typeforms_typeform.py:41: error: Expression is of type "typing.TypeForm(Any)", not "typing.TypeForm(Any)" [misc]']
"""
output = """
typeforms_typeform.py:23: error: Incompatible types in assignment (expression has type "typing.TypeForm(str | int)", variable has type "typing.TypeForm(str | None)") [assignment]
typeforms_typeform.py:24: error: Incompatible types in assignment (expression has type "type[list[str | None]]", variable has type "typing.TypeForm(str | None)") [assignment]
typeforms_typeform.py:41: error: Expression is of type "typing.TypeForm(Any)", not "typing.TypeForm(Any)" [misc]
typeforms_typeform.py:59: error: Invalid syntax [syntax]
typeforms_typeform.py:67: error: Invalid type comment or annotation [valid-type]
typeforms_typeform.py:68: error: Syntax error in type annotation [valid-type]
Expand Down
2 changes: 1 addition & 1 deletion conformance/results/zuban/version.toml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
version = "zuban 0.6.1"
version = "zuban 0.6.2"
Loading