Skip to content

Commit cf943cc

Browse files
Update pycroscope to 0.5.0 and refresh conformance results (#2349)
1 parent 5672d88 commit cf943cc

26 files changed

Lines changed: 129 additions & 384 deletions

conformance/results/pycroscope/aliases_implicit.toml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,12 @@ Line 113: Expected 1 errors
1313
Line 117: Expected 1 errors
1414
Line 118: Expected 1 errors
1515
Line 119: Expected 1 errors
16-
Line 68: Unexpected errors ['./aliases_implicit.py:68:16: .GoodTypeAlias9[<list containing [str, str]>, None] = (int, /, ****P) -> ~R is not equivalent to (int, str, str, /) -> None']
1716
Line 70: Unexpected errors ['./aliases_implicit.py:70:16: Any[from_another] is not equivalent to int | str | list[list[int]] | None']
18-
Line 72: Unexpected errors ['./aliases_implicit.py:72:16: .GoodTypeAlias13 = (**__P: **P) -> None is not equivalent to (...) -> None']
1917
Line 95: Unexpected errors ["./aliases_implicit.py:95:16: Cannot resolve subscripted annotation: <list containing [type 'int']> [invalid_annotation]"]
2018
Line 100: Unexpected errors ["./aliases_implicit.py:100:17: Annotated[type 'list', (<+list is_truthy None> == NullConstraint())] is always True because it does not provide __bool__ [type_always_true]"]
2119
"""
2220
output = """
23-
./aliases_implicit.py:68:16: .GoodTypeAlias9[<list containing [str, str]>, None] = (int, /, ****P) -> ~R is not equivalent to (int, str, str, /) -> None
2421
./aliases_implicit.py:70:16: Any[from_another] is not equivalent to int | str | list[list[int]] | None
25-
./aliases_implicit.py:72:16: .GoodTypeAlias13 = (**__P: **P) -> None is not equivalent to (...) -> None
2622
./aliases_implicit.py:77:8: Unrecognized annotation types.GenericAlias [invalid_annotation]
2723
./aliases_implicit.py:78:8: Expected 1 type arguments for type alias, got 2 [invalid_specialization]
2824
./aliases_implicit.py:79:8: Expected 1 type arguments for type alias, got 2 [invalid_specialization]

conformance/results/pycroscope/aliases_type_statement.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
conformant = "Partial"
22
notes = """
33
Fails to reject various weird annotations.
4+
Rejects a valid recursive generic type alias.
45
"""
56
conformance_automated = "Fail"
67
errors_diff = """
@@ -16,6 +17,7 @@ Line 45: Expected 1 errors
1617
Line 46: Expected 1 errors
1718
Line 47: Expected 1 errors
1819
Line 49: Expected 1 errors
20+
Line 61: Unexpected errors ['./aliases_type_statement.py:61:0: Unrecognized annotation typing._SpecialForm [invalid_annotation]']
1921
"""
2022
output = """
2123
./aliases_type_statement.py:17:0: typing.TypeAliasType has no attribute 'bit_count' [undefined_attribute]
@@ -26,6 +28,7 @@ output = """
2628
./aliases_type_statement.py:48:22: Annotated[type 'list', (<+list is_truthy None> == NullConstraint())] is always True because it does not provide __bool__ [type_always_true]
2729
./aliases_type_statement.py:53:22: Type alias cannot combine old-style TypeVar declarations with type statement parameters [invalid_type_alias]
2830
./aliases_type_statement.py:58:16: Type alias must declare type parameters in the type statement [invalid_type_alias]
31+
./aliases_type_statement.py:61:0: Unrecognized annotation typing._SpecialForm [invalid_annotation]
2932
./aliases_type_statement.py:68:6: Type argument str is not compatible with ~S@./aliases_type_statement.py.RecursiveTypeAlias2 [invalid_specialization]
3033
./aliases_type_statement.py:70:6: Type argument int is not compatible with ~T@./aliases_type_statement.py.RecursiveTypeAlias2 [invalid_specialization]
3134
./aliases_type_statement.py:73:0: Type alias RecursiveTypeAlias3 has a circular definition [invalid_type_alias]

conformance/results/pycroscope/aliases_typealiastype.toml

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,8 @@
1-
conformant = "Partial"
2-
notes = """
3-
Rejects valid `ParamSpec` specialization.
4-
"""
5-
conformance_automated = "Fail"
1+
conformance_automated = "Pass"
62
errors_diff = """
7-
Line 39: Unexpected errors ["./aliases_typealiastype.py:39:4: Unrecognized annotation <list containing [type 'int', type 'str']> [invalid_annotation]"]
83
"""
94
output = """
105
./aliases_typealiastype.py:32:6: typing.TypeAliasType has no attribute 'other_attrib' [undefined_attribute]
11-
./aliases_typealiastype.py:39:4: Unrecognized annotation <list containing [type 'int', type 'str']> [invalid_annotation]
126
./aliases_typealiastype.py:40:4: Type argument int is not compatible with ~TStr@./aliases_typealiastype.py.GoodAlias5 [invalid_specialization]
137
./aliases_typealiastype.py:43:44: Type alias cannot combine old-style TypeVar declarations with type statement parameters [invalid_type_alias]
148
./aliases_typealiastype.py:44:44: Type alias must declare type parameters in the type statement [invalid_type_alias]
Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,5 @@
1-
conformant = "Partial"
2-
notes = """
3-
Does not support callback protocols with PEP 695 ParamSpec type parameters.
4-
"""
5-
conformance_automated = "Fail"
1+
conformance_automated = "Pass"
62
errors_diff = """
7-
Line 115: Unexpected errors ['./callables_annotation.py:115:38: Traceback (most recent call last):', './callables_annotation.py:115:4: Traceback (most recent call last):']
83
"""
94
output = """
105
./callables_annotation.py:25:4: Missing required positional argument at position 1 [incompatible_call]
@@ -19,10 +14,8 @@ output = """
1914
./callables_annotation.py:59:4: Ellipsis must be used directly in Callable[..., T], not in Callable[[...], T] [invalid_annotation]
2015
./callables_annotation.py:91:0: Incompatible assignment: expected (int, /, **Any[explicit]) -> str, got () -> str [incompatible_assignment]
2116
./callables_annotation.py:93:0: Incompatible assignment: expected (int, /, **Any[explicit]) -> str, got (*, a: int) -> str [incompatible_assignment]
22-
./callables_annotation.py:115:38: Traceback (most recent call last):
23-
./callables_annotation.py:115:4: Traceback (most recent call last):
2417
./callables_annotation.py:159:4: Incompatible assignment: expected ./callables_annotation.py.Proto5[Any[explicit]], got ./callables_annotation.py.Proto8 [incompatible_assignment]
25-
./callables_annotation.py:172:4: Incompatible assignment: expected .Callback2[Any[ellipsis_callable]] = (int, /, ****P) -> str, got () -> str [incompatible_assignment]
18+
./callables_annotation.py:172:4: Incompatible assignment: expected .Callback2[AnySig()] = (int, /, ****P) -> str, got () -> str [incompatible_assignment]
2619
./callables_annotation.py:187:4: Incompatible assignment: expected (str, /, **Any[explicit]) -> str, got (int, str, /) -> str [incompatible_assignment]
27-
./callables_annotation.py:189:4: Incompatible assignment: expected .CallbackWithStr[Any[ellipsis_callable]] = (str, /, ****P) -> str, got (int, str, /) -> str [incompatible_assignment]
20+
./callables_annotation.py:189:4: Incompatible assignment: expected .CallbackWithStr[AnySig()] = (str, /, ****P) -> str, got (int, str, /) -> str [incompatible_assignment]
2821
"""

conformance/results/pycroscope/callables_protocol.toml

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,5 @@
1-
conformant = "Partial"
2-
notes = """
3-
Does not support callback protocols with PEP 695 ParamSpec type parameters.
4-
"""
5-
conformance_automated = "Fail"
1+
conformance_automated = "Pass"
62
errors_diff = """
7-
Line 179: Unexpected errors ['./callables_protocol.py:179:30: Traceback (most recent call last):', './callables_protocol.py:179:4: Traceback (most recent call last):']
83
"""
94
output = """
105
./callables_protocol.py:35:0: Incompatible assignment: expected ./callables_protocol.py.Proto1, got (*vals: tuple[bytes, ...], max_items: int | None) -> list[bytes] [incompatible_assignment]
@@ -17,8 +12,6 @@ output = """
1712
./callables_protocol.py:97:0: Incompatible assignment: expected ./callables_protocol.py.Proto4, got (x: int) -> None [incompatible_assignment]
1813
./callables_protocol.py:121:0: Incompatible assignment: expected ./callables_protocol.py.NotProto6, got (*vals: tuple[bytes, ...], max_len: int | None = None) -> list[bytes] [incompatible_assignment]
1914
./callables_protocol.py:169:0: Incompatible assignment: expected ./callables_protocol.py.Proto8, got (x: int) -> Any[explicit] [incompatible_assignment]
20-
./callables_protocol.py:179:30: Traceback (most recent call last):
21-
./callables_protocol.py:179:4: Traceback (most recent call last):
2215
./callables_protocol.py:186:4: Incompatible types in assignment to attribute 'other_attribute': expected int, got Literal['str'] [incompatible_assignment]
2316
./callables_protocol.py:187:4: ./callables_protocol.py.Proto9[**P@./callables_protocol.py.decorator1.<locals>.decorator1, +R@./callables_protocol.py.decorator1.<locals>.decorator1] has no attribute 'xxx' [undefined_attribute]
2417
./callables_protocol.py:197:6: ./callables_protocol.py.Proto9[(x: int) -> Any[unannotated], str] has no attribute 'other_attribute2' [undefined_attribute]

conformance/results/pycroscope/callables_subtyping.toml

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,5 @@
1-
conformant = "Partial"
2-
notes = """
3-
Does not support callback protocols with PEP 695 ParamSpec type parameters.
4-
"""
5-
conformance_automated = "Fail"
1+
conformance_automated = "Pass"
62
errors_diff = """
7-
Line 205: Unexpected errors ['./callables_subtyping.py:205:30: Traceback (most recent call last):', './callables_subtyping.py:205:4: Traceback (most recent call last):']
8-
Line 214: Unexpected errors ['./callables_subtyping.py:214:4: Incompatible assignment: expected callables_subtyping.ProtocolWithP[**P@callables_subtyping.func7.<locals>.func7], got callables_subtyping.TypeAliasWithP[**P@callables_subtyping.func7.<locals>.func7] = (**__P: **P) -> None [incompatible_assignment]']
93
"""
104
output = """
115
./callables_subtyping.py:26:4: Incompatible assignment: expected (float | int, /) -> float | int, got (int, /) -> int [incompatible_assignment]
@@ -34,9 +28,6 @@ output = """
3428
./callables_subtyping.py:195:4: Incompatible assignment: expected callables_subtyping.IntKwargs6, got callables_subtyping.StrKwargs6 [incompatible_assignment]
3529
./callables_subtyping.py:196:4: Incompatible assignment: expected callables_subtyping.Standard6, got callables_subtyping.IntStrKwargs6 [incompatible_assignment]
3630
./callables_subtyping.py:197:4: Incompatible assignment: expected callables_subtyping.Standard6, got callables_subtyping.StrKwargs6 [incompatible_assignment]
37-
./callables_subtyping.py:205:30: Traceback (most recent call last):
38-
./callables_subtyping.py:205:4: Traceback (most recent call last):
39-
./callables_subtyping.py:214:4: Incompatible assignment: expected callables_subtyping.ProtocolWithP[**P@callables_subtyping.func7.<locals>.func7], got callables_subtyping.TypeAliasWithP[**P@callables_subtyping.func7.<locals>.func7] = (**__P: **P) -> None [incompatible_assignment]
4031
./callables_subtyping.py:236:4: Incompatible assignment: expected callables_subtyping.DefaultArg8, got callables_subtyping.NoDefaultArg8 [incompatible_assignment]
4132
./callables_subtyping.py:237:4: Incompatible assignment: expected callables_subtyping.DefaultArg8, got callables_subtyping.NoX8 [incompatible_assignment]
4233
./callables_subtyping.py:240:4: Incompatible assignment: expected callables_subtyping.NoDefaultArg8, got callables_subtyping.NoX8 [incompatible_assignment]

conformance/results/pycroscope/classes_classvar.toml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,5 @@
1-
conformant = "Partial"
2-
notes = """
3-
Does not reject use of `ClassVar` as a qualifier for a NamedTuple field.
4-
"""
5-
conformance_automated = "Fail"
1+
conformance_automated = "Pass"
62
errors_diff = """
7-
Line 94: Expected 1 errors
83
"""
94
output = """
105
./classes_classvar.py:40:10: Invalid type annotation (<class 'int'>, <class 'str'>) [invalid_annotation]
@@ -23,6 +18,7 @@ output = """
2318
./classes_classvar.py:79:7: ClassVar can only be used for assignments in class body [invalid_qualifier]
2419
./classes_classvar.py:80:19: ClassVar cannot be used in type aliases [invalid_qualifier]
2520
./classes_classvar.py:89:7: Unexpected ClassVar annotation [invalid_qualifier]
21+
./classes_classvar.py:94:7: ClassVar cannot be used for NamedTuple fields [invalid_qualifier]
2622
./classes_classvar.py:127:0: Cannot assign to class variable 'stats' via instance [incompatible_assignment]
2723
./classes_classvar.py:156:0: Incompatible assignment: expected ./classes_classvar.py.ProtoA, got ./classes_classvar.py.ProtoAImpl [incompatible_assignment]
2824
"""
Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,12 @@
1-
conformant = "Partial"
2-
notes = """
3-
Does not honor `@override` compatibility checks for `__init__` and `__new__`:
4-
the incompatible constructor overrides in `ChildC2` are not flagged.
5-
"""
6-
conformance_automated = "Fail"
1+
conformance_automated = "Pass"
72
errors_diff = """
8-
Lines 134, 135: Expected error (tag 'init')
9-
Lines 137, 138: Expected error (tag 'new')
103
"""
114
output = """
125
./classes_override.py:53:4: Method does not override any base method [override_does_not_override]
136
./classes_override.py:65:4: Method does not override any base method [override_does_not_override]
147
./classes_override.py:79:4: Method does not override any base method [override_does_not_override]
158
./classes_override.py:84:4: Method does not override any base method [override_does_not_override]
169
./classes_override.py:89:4: Method does not override any base method [override_does_not_override]
10+
./classes_override.py:135:4: Value of __init__ incompatible with base class classes_override.ParentC [incompatible_override]
11+
./classes_override.py:138:4: Value of __new__ incompatible with base class classes_override.ParentC [incompatible_override]
1712
"""
Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,13 @@
1-
conformant = "Partial"
2-
notes = """
3-
Does not reject invalid class definitions due to disjoint bases, but uses disjoint base information in type narrowing.
4-
"""
5-
conformance_automated = "Fail"
1+
conformance_automated = "Pass"
62
errors_diff = """
7-
Line 69: Expected 1 errors
8-
Line 73: Expected 1 errors
9-
Line 77: Expected 1 errors
10-
Line 81: Expected 1 errors
11-
Line 105: Expected 1 errors
12-
Line 118: Expected 1 errors
13-
Line 123: Expected 1 errors
143
"""
154
output = """
16-
./directives_disjoint_base.py:113:1: Incompatible argument type for cls: expected ~_TC but got () -> None [incompatible_argument]
5+
./directives_disjoint_base.py:69:0: Class has incompatible disjoint bases [invalid_base]
6+
./directives_disjoint_base.py:73:0: Class has incompatible disjoint bases [invalid_base]
7+
./directives_disjoint_base.py:77:0: Class has incompatible disjoint bases [invalid_base]
8+
./directives_disjoint_base.py:81:0: Class has incompatible disjoint bases [invalid_base]
9+
./directives_disjoint_base.py:105:0: Class has incompatible disjoint bases [invalid_base]
10+
./directives_disjoint_base.py:113:1: disjoint_base cannot be applied to a function [invalid_disjoint_base]
11+
./directives_disjoint_base.py:118:1: disjoint_base cannot be applied to a TypedDict [invalid_disjoint_base]
12+
./directives_disjoint_base.py:123:1: disjoint_base cannot be applied to a Protocol [invalid_disjoint_base]
1713
"""

conformance/results/pycroscope/enums_definition.toml

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,5 @@
1-
conformant = "Partial"
2-
notes = """
3-
Does not allow enum members to be conditional on version/platform checks.
4-
"""
5-
conformance_automated = "Fail"
1+
conformance_automated = "Pass"
62
errors_diff = """
7-
Line 91: Unexpected errors ['./enums_definition.py:91:12: ./enums_definition.py.Color12 is not equivalent to Any[unannotated]']
83
"""
94
output = """
105
./enums_definition.py:34:12: enum.Enum has no attribute 'RED' [undefined_attribute]
@@ -23,6 +18,5 @@ output = """
2318
./enums_definition.py:40:32: type[enum.Enum] has no attribute 'RED' [undefined_attribute]
2419
./enums_definition.py:41:12: type[enum.Enum] has no attribute 'RED' [undefined_attribute]
2520
./enums_definition.py:41:32: type[enum.Enum] has no attribute 'RED' [undefined_attribute]
26-
./enums_definition.py:91:12: ./enums_definition.py.Color12 is not equivalent to Any[unannotated]
2721
./enums_definition.py:92:0: <class 'Color12'> has no attribute 'BLUE' [undefined_attribute]
2822
"""

0 commit comments

Comments
 (0)