Skip to content
Merged
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
4 changes: 0 additions & 4 deletions conformance/results/pycroscope/aliases_implicit.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,12 @@ Line 113: Expected 1 errors
Line 117: Expected 1 errors
Line 118: Expected 1 errors
Line 119: Expected 1 errors
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']
Line 70: Unexpected errors ['./aliases_implicit.py:70:16: Any[from_another] is not equivalent to int | str | list[list[int]] | None']
Line 72: Unexpected errors ['./aliases_implicit.py:72:16: .GoodTypeAlias13 = (**__P: **P) -> None is not equivalent to (...) -> None']
Line 95: Unexpected errors ["./aliases_implicit.py:95:16: Cannot resolve subscripted annotation: <list containing [type 'int']> [invalid_annotation]"]
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]"]
"""
output = """
./aliases_implicit.py:68:16: .GoodTypeAlias9[<list containing [str, str]>, None] = (int, /, ****P) -> ~R is not equivalent to (int, str, str, /) -> None
./aliases_implicit.py:70:16: Any[from_another] is not equivalent to int | str | list[list[int]] | None
./aliases_implicit.py:72:16: .GoodTypeAlias13 = (**__P: **P) -> None is not equivalent to (...) -> None
./aliases_implicit.py:77:8: Unrecognized annotation types.GenericAlias [invalid_annotation]
./aliases_implicit.py:78:8: Expected 1 type arguments for type alias, got 2 [invalid_specialization]
./aliases_implicit.py:79:8: Expected 1 type arguments for type alias, got 2 [invalid_specialization]
Expand Down
3 changes: 3 additions & 0 deletions conformance/results/pycroscope/aliases_type_statement.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
conformant = "Partial"
notes = """
Fails to reject various weird annotations.
Rejects a valid recursive generic type alias.
"""
conformance_automated = "Fail"
errors_diff = """
Expand All @@ -16,6 +17,7 @@ Line 45: Expected 1 errors
Line 46: Expected 1 errors
Line 47: Expected 1 errors
Line 49: Expected 1 errors
Line 61: Unexpected errors ['./aliases_type_statement.py:61:0: Unrecognized annotation typing._SpecialForm [invalid_annotation]']
"""
output = """
./aliases_type_statement.py:17:0: typing.TypeAliasType has no attribute 'bit_count' [undefined_attribute]
Expand All @@ -26,6 +28,7 @@ output = """
./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]
./aliases_type_statement.py:53:22: Type alias cannot combine old-style TypeVar declarations with type statement parameters [invalid_type_alias]
./aliases_type_statement.py:58:16: Type alias must declare type parameters in the type statement [invalid_type_alias]
./aliases_type_statement.py:61:0: Unrecognized annotation typing._SpecialForm [invalid_annotation]
./aliases_type_statement.py:68:6: Type argument str is not compatible with ~S@./aliases_type_statement.py.RecursiveTypeAlias2 [invalid_specialization]
./aliases_type_statement.py:70:6: Type argument int is not compatible with ~T@./aliases_type_statement.py.RecursiveTypeAlias2 [invalid_specialization]
./aliases_type_statement.py:73:0: Type alias RecursiveTypeAlias3 has a circular definition [invalid_type_alias]
Expand Down
8 changes: 1 addition & 7 deletions conformance/results/pycroscope/aliases_typealiastype.toml
Original file line number Diff line number Diff line change
@@ -1,14 +1,8 @@
conformant = "Partial"
notes = """
Rejects valid `ParamSpec` specialization.
"""
conformance_automated = "Fail"
conformance_automated = "Pass"
errors_diff = """
Line 39: Unexpected errors ["./aliases_typealiastype.py:39:4: Unrecognized annotation <list containing [type 'int', type 'str']> [invalid_annotation]"]
"""
output = """
./aliases_typealiastype.py:32:6: typing.TypeAliasType has no attribute 'other_attrib' [undefined_attribute]
./aliases_typealiastype.py:39:4: Unrecognized annotation <list containing [type 'int', type 'str']> [invalid_annotation]
./aliases_typealiastype.py:40:4: Type argument int is not compatible with ~TStr@./aliases_typealiastype.py.GoodAlias5 [invalid_specialization]
./aliases_typealiastype.py:43:44: Type alias cannot combine old-style TypeVar declarations with type statement parameters [invalid_type_alias]
./aliases_typealiastype.py:44:44: Type alias must declare type parameters in the type statement [invalid_type_alias]
Expand Down
13 changes: 3 additions & 10 deletions conformance/results/pycroscope/callables_annotation.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
conformant = "Partial"
notes = """
Does not support callback protocols with PEP 695 ParamSpec type parameters.
"""
conformance_automated = "Fail"
conformance_automated = "Pass"
errors_diff = """
Line 115: Unexpected errors ['./callables_annotation.py:115:38: Traceback (most recent call last):', './callables_annotation.py:115:4: Traceback (most recent call last):']
"""
output = """
./callables_annotation.py:25:4: Missing required positional argument at position 1 [incompatible_call]
Expand All @@ -19,10 +14,8 @@ output = """
./callables_annotation.py:59:4: Ellipsis must be used directly in Callable[..., T], not in Callable[[...], T] [invalid_annotation]
./callables_annotation.py:91:0: Incompatible assignment: expected (int, /, **Any[explicit]) -> str, got () -> str [incompatible_assignment]
./callables_annotation.py:93:0: Incompatible assignment: expected (int, /, **Any[explicit]) -> str, got (*, a: int) -> str [incompatible_assignment]
./callables_annotation.py:115:38: Traceback (most recent call last):
./callables_annotation.py:115:4: Traceback (most recent call last):
./callables_annotation.py:159:4: Incompatible assignment: expected ./callables_annotation.py.Proto5[Any[explicit]], got ./callables_annotation.py.Proto8 [incompatible_assignment]
./callables_annotation.py:172:4: Incompatible assignment: expected .Callback2[Any[ellipsis_callable]] = (int, /, ****P) -> str, got () -> str [incompatible_assignment]
./callables_annotation.py:172:4: Incompatible assignment: expected .Callback2[AnySig()] = (int, /, ****P) -> str, got () -> str [incompatible_assignment]
./callables_annotation.py:187:4: Incompatible assignment: expected (str, /, **Any[explicit]) -> str, got (int, str, /) -> str [incompatible_assignment]
./callables_annotation.py:189:4: Incompatible assignment: expected .CallbackWithStr[Any[ellipsis_callable]] = (str, /, ****P) -> str, got (int, str, /) -> str [incompatible_assignment]
./callables_annotation.py:189:4: Incompatible assignment: expected .CallbackWithStr[AnySig()] = (str, /, ****P) -> str, got (int, str, /) -> str [incompatible_assignment]
"""
9 changes: 1 addition & 8 deletions conformance/results/pycroscope/callables_protocol.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
conformant = "Partial"
notes = """
Does not support callback protocols with PEP 695 ParamSpec type parameters.
"""
conformance_automated = "Fail"
conformance_automated = "Pass"
errors_diff = """
Line 179: Unexpected errors ['./callables_protocol.py:179:30: Traceback (most recent call last):', './callables_protocol.py:179:4: Traceback (most recent call last):']
"""
output = """
./callables_protocol.py:35:0: Incompatible assignment: expected ./callables_protocol.py.Proto1, got (*vals: tuple[bytes, ...], max_items: int | None) -> list[bytes] [incompatible_assignment]
Expand All @@ -17,8 +12,6 @@ output = """
./callables_protocol.py:97:0: Incompatible assignment: expected ./callables_protocol.py.Proto4, got (x: int) -> None [incompatible_assignment]
./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]
./callables_protocol.py:169:0: Incompatible assignment: expected ./callables_protocol.py.Proto8, got (x: int) -> Any[explicit] [incompatible_assignment]
./callables_protocol.py:179:30: Traceback (most recent call last):
./callables_protocol.py:179:4: Traceback (most recent call last):
./callables_protocol.py:186:4: Incompatible types in assignment to attribute 'other_attribute': expected int, got Literal['str'] [incompatible_assignment]
./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]
./callables_protocol.py:197:6: ./callables_protocol.py.Proto9[(x: int) -> Any[unannotated], str] has no attribute 'other_attribute2' [undefined_attribute]
Expand Down
11 changes: 1 addition & 10 deletions conformance/results/pycroscope/callables_subtyping.toml
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
conformant = "Partial"
notes = """
Does not support callback protocols with PEP 695 ParamSpec type parameters.
"""
conformance_automated = "Fail"
conformance_automated = "Pass"
errors_diff = """
Line 205: Unexpected errors ['./callables_subtyping.py:205:30: Traceback (most recent call last):', './callables_subtyping.py:205:4: Traceback (most recent call last):']
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]']
"""
output = """
./callables_subtyping.py:26:4: Incompatible assignment: expected (float | int, /) -> float | int, got (int, /) -> int [incompatible_assignment]
Expand Down Expand Up @@ -34,9 +28,6 @@ output = """
./callables_subtyping.py:195:4: Incompatible assignment: expected callables_subtyping.IntKwargs6, got callables_subtyping.StrKwargs6 [incompatible_assignment]
./callables_subtyping.py:196:4: Incompatible assignment: expected callables_subtyping.Standard6, got callables_subtyping.IntStrKwargs6 [incompatible_assignment]
./callables_subtyping.py:197:4: Incompatible assignment: expected callables_subtyping.Standard6, got callables_subtyping.StrKwargs6 [incompatible_assignment]
./callables_subtyping.py:205:30: Traceback (most recent call last):
./callables_subtyping.py:205:4: Traceback (most recent call last):
./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]
./callables_subtyping.py:236:4: Incompatible assignment: expected callables_subtyping.DefaultArg8, got callables_subtyping.NoDefaultArg8 [incompatible_assignment]
./callables_subtyping.py:237:4: Incompatible assignment: expected callables_subtyping.DefaultArg8, got callables_subtyping.NoX8 [incompatible_assignment]
./callables_subtyping.py:240:4: Incompatible assignment: expected callables_subtyping.NoDefaultArg8, got callables_subtyping.NoX8 [incompatible_assignment]
Expand Down
8 changes: 2 additions & 6 deletions conformance/results/pycroscope/classes_classvar.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
conformant = "Partial"
notes = """
Does not reject use of `ClassVar` as a qualifier for a NamedTuple field.
"""
conformance_automated = "Fail"
conformance_automated = "Pass"
errors_diff = """
Line 94: Expected 1 errors
"""
output = """
./classes_classvar.py:40:10: Invalid type annotation (<class 'int'>, <class 'str'>) [invalid_annotation]
Expand All @@ -23,6 +18,7 @@ output = """
./classes_classvar.py:79:7: ClassVar can only be used for assignments in class body [invalid_qualifier]
./classes_classvar.py:80:19: ClassVar cannot be used in type aliases [invalid_qualifier]
./classes_classvar.py:89:7: Unexpected ClassVar annotation [invalid_qualifier]
./classes_classvar.py:94:7: ClassVar cannot be used for NamedTuple fields [invalid_qualifier]
./classes_classvar.py:127:0: Cannot assign to class variable 'stats' via instance [incompatible_assignment]
./classes_classvar.py:156:0: Incompatible assignment: expected ./classes_classvar.py.ProtoA, got ./classes_classvar.py.ProtoAImpl [incompatible_assignment]
"""
11 changes: 3 additions & 8 deletions conformance/results/pycroscope/classes_override.toml
Original file line number Diff line number Diff line change
@@ -1,17 +1,12 @@
conformant = "Partial"
notes = """
Does not honor `@override` compatibility checks for `__init__` and `__new__`:
the incompatible constructor overrides in `ChildC2` are not flagged.
"""
conformance_automated = "Fail"
conformance_automated = "Pass"
errors_diff = """
Lines 134, 135: Expected error (tag 'init')
Lines 137, 138: Expected error (tag 'new')
"""
output = """
./classes_override.py:53:4: Method does not override any base method [override_does_not_override]
./classes_override.py:65:4: Method does not override any base method [override_does_not_override]
./classes_override.py:79:4: Method does not override any base method [override_does_not_override]
./classes_override.py:84:4: Method does not override any base method [override_does_not_override]
./classes_override.py:89:4: Method does not override any base method [override_does_not_override]
./classes_override.py:135:4: Value of __init__ incompatible with base class classes_override.ParentC [incompatible_override]
./classes_override.py:138:4: Value of __new__ incompatible with base class classes_override.ParentC [incompatible_override]
"""
22 changes: 9 additions & 13 deletions conformance/results/pycroscope/directives_disjoint_base.toml
Original file line number Diff line number Diff line change
@@ -1,17 +1,13 @@
conformant = "Partial"
notes = """
Does not reject invalid class definitions due to disjoint bases, but uses disjoint base information in type narrowing.
"""
conformance_automated = "Fail"
conformance_automated = "Pass"
errors_diff = """
Line 69: Expected 1 errors
Line 73: Expected 1 errors
Line 77: Expected 1 errors
Line 81: Expected 1 errors
Line 105: Expected 1 errors
Line 118: Expected 1 errors
Line 123: Expected 1 errors
"""
output = """
./directives_disjoint_base.py:113:1: Incompatible argument type for cls: expected ~_TC but got () -> None [incompatible_argument]
./directives_disjoint_base.py:69:0: Class has incompatible disjoint bases [invalid_base]
./directives_disjoint_base.py:73:0: Class has incompatible disjoint bases [invalid_base]
./directives_disjoint_base.py:77:0: Class has incompatible disjoint bases [invalid_base]
./directives_disjoint_base.py:81:0: Class has incompatible disjoint bases [invalid_base]
./directives_disjoint_base.py:105:0: Class has incompatible disjoint bases [invalid_base]
./directives_disjoint_base.py:113:1: disjoint_base cannot be applied to a function [invalid_disjoint_base]
./directives_disjoint_base.py:118:1: disjoint_base cannot be applied to a TypedDict [invalid_disjoint_base]
./directives_disjoint_base.py:123:1: disjoint_base cannot be applied to a Protocol [invalid_disjoint_base]
"""
8 changes: 1 addition & 7 deletions conformance/results/pycroscope/enums_definition.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
conformant = "Partial"
notes = """
Does not allow enum members to be conditional on version/platform checks.
"""
conformance_automated = "Fail"
conformance_automated = "Pass"
errors_diff = """
Line 91: Unexpected errors ['./enums_definition.py:91:12: ./enums_definition.py.Color12 is not equivalent to Any[unannotated]']
"""
output = """
./enums_definition.py:34:12: enum.Enum has no attribute 'RED' [undefined_attribute]
Expand All @@ -23,6 +18,5 @@ output = """
./enums_definition.py:40:32: type[enum.Enum] has no attribute 'RED' [undefined_attribute]
./enums_definition.py:41:12: type[enum.Enum] has no attribute 'RED' [undefined_attribute]
./enums_definition.py:41:32: type[enum.Enum] has no attribute 'RED' [undefined_attribute]
./enums_definition.py:91:12: ./enums_definition.py.Color12 is not equivalent to Any[unannotated]
./enums_definition.py:92:0: <class 'Color12'> has no attribute 'BLUE' [undefined_attribute]
"""
43 changes: 5 additions & 38 deletions conformance/results/pycroscope/generics_defaults.toml
Original file line number Diff line number Diff line change
@@ -1,44 +1,11 @@
conformant = "Partial"
notes = """
Numerous issues; does not support `TypeVarTuple` and `ParamSpec` defaults.
"""
conformance_automated = "Fail"
conformance_automated = "Pass"
errors_diff = """
Line 33: Unexpected errors ['./generics_defaults.py:33:16: ~DefaultStrT@./generics_defaults.py.NoNonDefaults is not equivalent to str']
Line 34: Unexpected errors ['./generics_defaults.py:34:16: ~DefaultIntT@./generics_defaults.py.NoNonDefaults is not equivalent to int']
Line 73: Unexpected errors ['./generics_defaults.py:73:16: ~T1@./generics_defaults.py.AllTheDefaults is not equivalent to Any[explicit]']
Line 74: Unexpected errors ['./generics_defaults.py:74:16: ~T2@./generics_defaults.py.AllTheDefaults is not equivalent to Any[explicit]']
Line 75: Unexpected errors ['./generics_defaults.py:75:16: ~DefaultStrT@./generics_defaults.py.NoNonDefaults is not equivalent to str']
Line 76: Unexpected errors ['./generics_defaults.py:76:16: ~DefaultIntT@./generics_defaults.py.NoNonDefaults is not equivalent to int']
Line 77: Unexpected errors ['./generics_defaults.py:77:16: ~DefaultBoolT@./generics_defaults.py.AllTheDefaults is not equivalent to bool']
Line 122: Unexpected errors ['./generics_defaults.py:122:16: (**__P: **DefaultP@./generics_defaults.py.Class_ParamSpec) -> None is not equivalent to (str, int, /) -> None']
Line 124: Unexpected errors ['./generics_defaults.py:124:16: ./generics_defaults.py.Class_ParamSpec[AnySig()] is not equivalent to ./generics_defaults.py.Class_ParamSpec[tuple[bool, bool]]']
Line 144: Unexpected errors ['./generics_defaults.py:144:60: Incompatible argument type for default: expected TypeForm[object] but got Literal[typing.Unpack[DefaultTs]] [incompatible_argument]']
Line 203: Unexpected errors ["./generics_defaults.py:203:36: Invalid type annotation [<class 'bytes'>] [invalid_annotation]", './generics_defaults.py:203:17: ParamSpec specialization must use list form, Concatenate[..., P], P, or ... [invalid_annotation]']
Line 204: Unexpected errors ['./generics_defaults.py:204:16: tuple[int] is not equivalent to tuple[int, str]']
Line 205: Unexpected errors ['./generics_defaults.py:205:16: (...) -> None is not equivalent to (float | int, bool, /) -> None']
Line 208: Unexpected errors ['./generics_defaults.py:208:16: (...) -> None is not equivalent to (bytes, /) -> None']
"""
output = """
./generics_defaults.py:24:0: non-default TypeVars cannot follow ones with defaults [invalid_type_parameter]
./generics_defaults.py:33:16: ~DefaultStrT@./generics_defaults.py.NoNonDefaults is not equivalent to str
./generics_defaults.py:34:16: ~DefaultIntT@./generics_defaults.py.NoNonDefaults is not equivalent to int
./generics_defaults.py:24:0: non-default TypeVars cannot follow ones with defaults [invalid_type_parameter_default]
./generics_defaults.py:66:7: Expected at least 2 type arguments for ./generics_defaults.py.AllTheDefaults [invalid_specialization]
./generics_defaults.py:73:16: ~T1@./generics_defaults.py.AllTheDefaults is not equivalent to Any[explicit]
./generics_defaults.py:74:16: ~T2@./generics_defaults.py.AllTheDefaults is not equivalent to Any[explicit]
./generics_defaults.py:75:16: ~DefaultStrT@./generics_defaults.py.NoNonDefaults is not equivalent to str
./generics_defaults.py:76:16: ~DefaultIntT@./generics_defaults.py.NoNonDefaults is not equivalent to int
./generics_defaults.py:77:16: ~DefaultBoolT@./generics_defaults.py.AllTheDefaults is not equivalent to bool
./generics_defaults.py:122:16: (**__P: **DefaultP@./generics_defaults.py.Class_ParamSpec) -> None is not equivalent to (str, int, /) -> None
./generics_defaults.py:124:16: ./generics_defaults.py.Class_ParamSpec[AnySig()] is not equivalent to ./generics_defaults.py.Class_ParamSpec[tuple[bool, bool]]
./generics_defaults.py:144:60: Incompatible argument type for default: expected TypeForm[object] but got Literal[typing.Unpack[DefaultTs]] [incompatible_argument]
./generics_defaults.py:152:50: TypeVar default must be assignable to its bound [incompatible_call]
./generics_defaults.py:159:51: TypeVar default must be one of its constraints [incompatible_call]
./generics_defaults.py:152:50: TypeVar default must be assignable to its bound [invalid_type_parameter_default]
./generics_defaults.py:159:51: TypeVar default must be one of its constraints [invalid_type_parameter_default]
./generics_defaults.py:176:12: Any[generic_argument] is not equivalent to int
./generics_defaults.py:188:0: TypeVars with defaults cannot follow TypeVarTuples [invalid_type_parameter]
./generics_defaults.py:203:36: Invalid type annotation [<class 'bytes'>] [invalid_annotation]
./generics_defaults.py:203:17: ParamSpec specialization must use list form, Concatenate[..., P], P, or ... [invalid_annotation]
./generics_defaults.py:204:16: tuple[int] is not equivalent to tuple[int, str]
./generics_defaults.py:205:16: (...) -> None is not equivalent to (float | int, bool, /) -> None
./generics_defaults.py:208:16: (...) -> None is not equivalent to (bytes, /) -> None
./generics_defaults.py:188:0: TypeVars with defaults cannot follow TypeVarTuples [invalid_type_parameter_default]
"""
Loading