diff --git a/conformance/results/pyrefly/aliases_explicit.toml b/conformance/results/pyrefly/aliases_explicit.toml index bb7b6d77..ced5ae98 100644 --- a/conformance/results/pyrefly/aliases_explicit.toml +++ b/conformance/results/pyrefly/aliases_explicit.toml @@ -1,28 +1,29 @@ +conformant = "Pass" conformance_automated = "Pass" errors_diff = """ """ output = """ -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/aliases_explicit.py:67:9-28: `TypeAlias[GoodTypeAlias2, type[int | None]]` is not subscriptable [unsupported-operation] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/aliases_explicit.py:68:9-28: `TypeAlias[GoodTypeAlias3, type[list[int | None]]]` is not subscriptable [unsupported-operation] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/aliases_explicit.py:69:9-33: Expected 1 type argument for `GoodTypeAlias4`, got 2 [bad-specialization] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/aliases_explicit.py:70:9-33: Expected 1 type argument for `GoodTypeAlias8`, got 2 [bad-specialization] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/aliases_explicit.py:71:9-33: Expected a valid ParamSpec expression, got `int` [invalid-param-spec] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/aliases_explicit.py:79:21-61: function call cannot be used in annotations [invalid-annotation] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/aliases_explicit.py:80:21-31: list literal cannot be used in annotations [invalid-annotation] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/aliases_explicit.py:81:21-34: tuple literal cannot be used in annotations [invalid-annotation] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/aliases_explicit.py:82:21-44: list comprehension cannot be used in annotations [invalid-annotation] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/aliases_explicit.py:83:21-31: dict literal cannot be used in annotations [invalid-annotation] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/aliases_explicit.py:83:23-24: Could not find name `a` [unknown-name] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/aliases_explicit.py:83:28-29: Could not find name `b` [unknown-name] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/aliases_explicit.py:84:21-36: function call cannot be used in annotations [invalid-annotation] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/aliases_explicit.py:85:21-29: invalid subscript expression cannot be used in annotations [invalid-annotation] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/aliases_explicit.py:86:21-42: if expression cannot be used in annotations [invalid-annotation] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/aliases_explicit.py:87:21-25: Expected `BadTypeAlias9` to be a type alias, got `Literal[3]` [type-alias-error] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/aliases_explicit.py:88:22-26: bool literal cannot be used in annotations [invalid-annotation] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/aliases_explicit.py:89:22-23: number literal cannot be used in annotations [invalid-annotation] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/aliases_explicit.py:90:22-33: boolean operation cannot be used in annotations [invalid-annotation] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/aliases_explicit.py:91:22-32: f-string cannot be used in annotations [invalid-annotation] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/aliases_explicit.py:100:5-19: `TypeAlias[ListAlias, type[list[Unknown]]]` is not subscriptable [unsupported-operation] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/aliases_explicit.py:101:6-20: Expected a callable, got TypeAlias[ListOrSetAlias, type[list[Unknown] | set[Unknown]]] [not-callable] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/aliases_explicit.py:102:5-24: `TypeAlias[ListOrSetAlias, type[list[Unknown] | set[Unknown]]]` is not subscriptable [unsupported-operation] +ERROR aliases_explicit.py:67:9-28: `TypeAlias[GoodTypeAlias2, type[int | None]]` is not subscriptable [unsupported-operation] +ERROR aliases_explicit.py:68:9-28: `TypeAlias[GoodTypeAlias3, type[list[int | None]]]` is not subscriptable [unsupported-operation] +ERROR aliases_explicit.py:69:9-33: Expected 1 type argument for `GoodTypeAlias4`, got 2 [bad-specialization] +ERROR aliases_explicit.py:70:9-33: Expected 1 type argument for `GoodTypeAlias8`, got 2 [bad-specialization] +ERROR aliases_explicit.py:71:9-33: Expected a valid ParamSpec expression, got `int` [invalid-param-spec] +ERROR aliases_explicit.py:79:21-61: function call cannot be used in annotations [invalid-annotation] +ERROR aliases_explicit.py:80:21-31: list literal cannot be used in annotations [invalid-annotation] +ERROR aliases_explicit.py:81:21-34: tuple literal cannot be used in annotations [invalid-annotation] +ERROR aliases_explicit.py:82:21-44: list comprehension cannot be used in annotations [invalid-annotation] +ERROR aliases_explicit.py:83:21-31: dict literal cannot be used in annotations [invalid-annotation] +ERROR aliases_explicit.py:83:23-24: Could not find name `a` [unknown-name] +ERROR aliases_explicit.py:83:28-29: Could not find name `b` [unknown-name] +ERROR aliases_explicit.py:84:21-36: function call cannot be used in annotations [invalid-annotation] +ERROR aliases_explicit.py:85:21-29: invalid subscript expression cannot be used in annotations [invalid-annotation] +ERROR aliases_explicit.py:86:21-42: if expression cannot be used in annotations [invalid-annotation] +ERROR aliases_explicit.py:87:21-25: Expected `BadTypeAlias9` to be a type alias, got `Literal[3]` [type-alias-error] +ERROR aliases_explicit.py:88:22-26: bool literal cannot be used in annotations [invalid-annotation] +ERROR aliases_explicit.py:89:22-23: number literal cannot be used in annotations [invalid-annotation] +ERROR aliases_explicit.py:90:22-33: boolean operation cannot be used in annotations [invalid-annotation] +ERROR aliases_explicit.py:91:22-32: f-string cannot be used in annotations [invalid-annotation] +ERROR aliases_explicit.py:100:5-19: `TypeAlias[ListAlias, type[list[Unknown]]]` is not subscriptable [unsupported-operation] +ERROR aliases_explicit.py:101:6-20: Expected a callable, got TypeAlias[ListOrSetAlias, type[list[Unknown] | set[Unknown]]] [not-callable] +ERROR aliases_explicit.py:102:5-24: `TypeAlias[ListOrSetAlias, type[list[Unknown] | set[Unknown]]]` is not subscriptable [unsupported-operation] """ diff --git a/conformance/results/pyrefly/aliases_implicit.toml b/conformance/results/pyrefly/aliases_implicit.toml index 124c1a3b..ee563bb4 100644 --- a/conformance/results/pyrefly/aliases_implicit.toml +++ b/conformance/results/pyrefly/aliases_implicit.toml @@ -11,21 +11,21 @@ Line 113: Expected 1 errors Line 117: Expected 1 errors """ output = """ -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/aliases_implicit.py:76:9-28: `type[int | None]` is not subscriptable [unsupported-operation] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/aliases_implicit.py:77:9-28: `type[list[int | None]]` is not subscriptable [unsupported-operation] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/aliases_implicit.py:78:9-33: Expected 1 type argument for `GoodTypeAlias4`, got 2 [bad-specialization] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/aliases_implicit.py:79:9-33: Expected 1 type argument for `GoodTypeAlias8`, got 2 [bad-specialization] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/aliases_implicit.py:80:9-33: Expected a valid ParamSpec expression, got `int` [invalid-param-spec] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/aliases_implicit.py:81:9-29: Type `str` is not assignable to upper bound `float` of type variable `TFloat` [bad-specialization] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/aliases_implicit.py:107:9-22: Expected a type form, got instance of `list[type[int] | type[str]]` [not-a-type] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/aliases_implicit.py:108:9-22: Expected a type form, got instance of `tuple[tuple[type[int], type[str]]]` [not-a-type] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/aliases_implicit.py:109:9-22: Expected a type form, got instance of `list[type[int]]` [not-a-type] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/aliases_implicit.py:110:9-22: Expected a type form, got instance of `dict[str, str]` [not-a-type] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/aliases_implicit.py:114:9-22: Expected a type form, got instance of `Literal[3]` [not-a-type] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/aliases_implicit.py:115:10-24: Expected a type form, got instance of `Literal[True]` [not-a-type] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/aliases_implicit.py:116:10-24: Expected a type form, got instance of `Literal[1]` [not-a-type] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/aliases_implicit.py:118:10-24: Expected a type form, got instance of `Literal['int']` [not-a-type] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/aliases_implicit.py:119:10-24: Expected a type form, got instance of `Literal['int | str']` [not-a-type] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/aliases_implicit.py:133:6-20: Expected a callable, got type[list[Unknown] | set[Unknown]] [not-callable] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/aliases_implicit.py:135:5-24: `type[list[Unknown] | set[Unknown]]` is not subscriptable [unsupported-operation] +ERROR aliases_implicit.py:76:9-28: `type[int | None]` is not subscriptable [unsupported-operation] +ERROR aliases_implicit.py:77:9-28: `type[list[int | None]]` is not subscriptable [unsupported-operation] +ERROR aliases_implicit.py:78:9-33: Expected 1 type argument for `GoodTypeAlias4`, got 2 [bad-specialization] +ERROR aliases_implicit.py:79:9-33: Expected 1 type argument for `GoodTypeAlias8`, got 2 [bad-specialization] +ERROR aliases_implicit.py:80:9-33: Expected a valid ParamSpec expression, got `int` [invalid-param-spec] +ERROR aliases_implicit.py:81:9-29: Type `str` is not assignable to upper bound `float` of type variable `TFloat` [bad-specialization] +ERROR aliases_implicit.py:107:9-22: Expected a type form, got instance of `list[type[int] | type[str]]` [not-a-type] +ERROR aliases_implicit.py:108:9-22: Expected a type form, got instance of `tuple[tuple[type[int], type[str]]]` [not-a-type] +ERROR aliases_implicit.py:109:9-22: Expected a type form, got instance of `list[type[int]]` [not-a-type] +ERROR aliases_implicit.py:110:9-22: Expected a type form, got instance of `dict[str, str]` [not-a-type] +ERROR aliases_implicit.py:114:9-22: Expected a type form, got instance of `Literal[3]` [not-a-type] +ERROR aliases_implicit.py:115:10-24: Expected a type form, got instance of `Literal[True]` [not-a-type] +ERROR aliases_implicit.py:116:10-24: Expected a type form, got instance of `Literal[1]` [not-a-type] +ERROR aliases_implicit.py:118:10-24: Expected a type form, got instance of `Literal['int']` [not-a-type] +ERROR aliases_implicit.py:119:10-24: Expected a type form, got instance of `Literal['int | str']` [not-a-type] +ERROR aliases_implicit.py:133:6-20: Expected a callable, got type[list[Unknown] | set[Unknown]] [not-callable] +ERROR aliases_implicit.py:135:5-24: `type[list[Unknown] | set[Unknown]]` is not subscriptable [unsupported-operation] """ diff --git a/conformance/results/pyrefly/aliases_newtype.toml b/conformance/results/pyrefly/aliases_newtype.toml index 31a4d5e2..fa14cc80 100644 --- a/conformance/results/pyrefly/aliases_newtype.toml +++ b/conformance/results/pyrefly/aliases_newtype.toml @@ -1,19 +1,20 @@ +conformant = "Pass" conformance_automated = "Pass" errors_diff = """ """ output = """ -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/aliases_newtype.py:11:8-14: Argument `Literal['user']` is not assignable to parameter `_x` with type `int` in function `UserId.__new__` [bad-argument-type] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/aliases_newtype.py:12:14-16: `Literal[42]` is not assignable to `UserId` [bad-assignment] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/aliases_newtype.py:18:11-17: `type[UserId]` is not assignable to `type` [bad-assignment] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/aliases_newtype.py:23:16-22: NewType `UserId` not allowed in isinstance() [invalid-argument] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/aliases_newtype.py:26:21-27: Subclassing a NewType not allowed [invalid-inheritance] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/aliases_newtype.py:35:20-29: Expected string literal "GoodName" [invalid-argument] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/aliases_newtype.py:41:6-23: Expected 0 type arguments for `GoodNewType1`, got 1 [bad-specialization] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/aliases_newtype.py:47:38-47: Second argument to NewType is invalid [invalid-argument] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/aliases_newtype.py:50:38-45: Second argument to NewType cannot be an unbound generic [invalid-argument] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/aliases_newtype.py:52:38-46: Second argument to NewType cannot be a protocol [invalid-argument] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/aliases_newtype.py:54:38-48: Second argument to NewType is invalid [invalid-argument] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/aliases_newtype.py:61:38-41: Second argument to NewType is invalid [invalid-argument] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/aliases_newtype.py:63:43-46: Expected 2 positional arguments, got 3 in function `typing.NewType.__init__` [bad-argument-count] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/aliases_newtype.py:65:38-41: Second argument to NewType is invalid [invalid-argument] +ERROR aliases_newtype.py:11:8-14: Argument `Literal['user']` is not assignable to parameter `_x` with type `int` in function `UserId.__new__` [bad-argument-type] +ERROR aliases_newtype.py:12:14-16: `Literal[42]` is not assignable to `UserId` [bad-assignment] +ERROR aliases_newtype.py:18:11-17: `type[UserId]` is not assignable to `type` [bad-assignment] +ERROR aliases_newtype.py:23:16-22: NewType `UserId` not allowed in isinstance() [invalid-argument] +ERROR aliases_newtype.py:26:21-27: Subclassing a NewType not allowed [invalid-inheritance] +ERROR aliases_newtype.py:35:20-29: Expected string literal "GoodName" [invalid-argument] +ERROR aliases_newtype.py:41:6-23: Expected 0 type arguments for `GoodNewType1`, got 1 [bad-specialization] +ERROR aliases_newtype.py:47:38-47: Second argument to NewType is invalid [invalid-argument] +ERROR aliases_newtype.py:50:38-45: Second argument to NewType cannot be an unbound generic [invalid-argument] +ERROR aliases_newtype.py:52:38-46: Second argument to NewType cannot be a protocol [invalid-argument] +ERROR aliases_newtype.py:54:38-48: Second argument to NewType is invalid [invalid-argument] +ERROR aliases_newtype.py:61:38-41: Second argument to NewType is invalid [invalid-argument] +ERROR aliases_newtype.py:63:43-46: Expected 2 positional arguments, got 3 in function `typing.NewType.__init__` [bad-argument-count] +ERROR aliases_newtype.py:65:38-41: Second argument to NewType is invalid [invalid-argument] """ diff --git a/conformance/results/pyrefly/aliases_recursive.toml b/conformance/results/pyrefly/aliases_recursive.toml index 2d08b464..e227e2ba 100644 --- a/conformance/results/pyrefly/aliases_recursive.toml +++ b/conformance/results/pyrefly/aliases_recursive.toml @@ -20,14 +20,14 @@ Line 67: Unexpected errors ['`type[list[Unknown]]` is not subscriptable [unsuppo Line 68: Unexpected errors ['`type[list[Unknown]]` is not subscriptable [unsupported-operation]'] """ output = """ -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/aliases_recursive.py:30:36-52: Expected a type form, got instance of `Literal['RecursiveTuple']` [not-a-type] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/aliases_recursive.py:42:45-63: Expected a type form, got instance of `Literal['RecursiveMapping']` [not-a-type] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/aliases_recursive.py:58:26-54: Expected a type form, got instance of `_SpecialForm` [not-a-type] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/aliases_recursive.py:59:25-47: `type[list[Unknown]]` is not subscriptable [unsupported-operation] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/aliases_recursive.py:62:5-27: `type[list[Unknown]]` is not subscriptable [unsupported-operation] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/aliases_recursive.py:63:5-27: `type[list[Unknown]]` is not subscriptable [unsupported-operation] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/aliases_recursive.py:65:26-63: Expected a type form, got instance of `_SpecialForm` [not-a-type] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/aliases_recursive.py:67:5-32: `type[list[Unknown]]` is not subscriptable [unsupported-operation] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/aliases_recursive.py:68:5-34: `type[list[Unknown]]` is not subscriptable [unsupported-operation] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/aliases_recursive.py:69:5-32: `type[list[Unknown]]` is not subscriptable [unsupported-operation] +ERROR aliases_recursive.py:30:36-52: Expected a type form, got instance of `Literal['RecursiveTuple']` [not-a-type] +ERROR aliases_recursive.py:42:45-63: Expected a type form, got instance of `Literal['RecursiveMapping']` [not-a-type] +ERROR aliases_recursive.py:58:26-54: Expected a type form, got instance of `_SpecialForm` [not-a-type] +ERROR aliases_recursive.py:59:25-47: `type[list[Unknown]]` is not subscriptable [unsupported-operation] +ERROR aliases_recursive.py:62:5-27: `type[list[Unknown]]` is not subscriptable [unsupported-operation] +ERROR aliases_recursive.py:63:5-27: `type[list[Unknown]]` is not subscriptable [unsupported-operation] +ERROR aliases_recursive.py:65:26-63: Expected a type form, got instance of `_SpecialForm` [not-a-type] +ERROR aliases_recursive.py:67:5-32: `type[list[Unknown]]` is not subscriptable [unsupported-operation] +ERROR aliases_recursive.py:68:5-34: `type[list[Unknown]]` is not subscriptable [unsupported-operation] +ERROR aliases_recursive.py:69:5-32: `type[list[Unknown]]` is not subscriptable [unsupported-operation] """ diff --git a/conformance/results/pyrefly/aliases_type_statement.toml b/conformance/results/pyrefly/aliases_type_statement.toml index 3e8999c5..a838d557 100644 --- a/conformance/results/pyrefly/aliases_type_statement.toml +++ b/conformance/results/pyrefly/aliases_type_statement.toml @@ -13,28 +13,28 @@ Lines 51, 52: Expected error (tag 'TA14') Lines 88, 89: Expected error (tag 'RTA6') """ output = """ -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/aliases_type_statement.py:17:1-21: Object of class `TypeAliasType` has no attribute `bit_count` [missing-attribute] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/aliases_type_statement.py:19:1-11: Expected a callable, got TypeAlias[GoodAlias1, type[int]] [not-callable] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/aliases_type_statement.py:23:7-30: Object of class `TypeAliasType` has no attribute `other_attrib` [missing-attribute] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/aliases_type_statement.py:31:22-32: Expected class object, got `TypeAliasType` [invalid-argument] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/aliases_type_statement.py:37:22-62: function call cannot be used in annotations [invalid-annotation] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/aliases_type_statement.py:38:22-32: list literal cannot be used in annotations [invalid-annotation] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/aliases_type_statement.py:39:22-35: tuple literal cannot be used in annotations [invalid-annotation] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/aliases_type_statement.py:40:22-45: list comprehension cannot be used in annotations [invalid-annotation] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/aliases_type_statement.py:41:22-32: dict literal cannot be used in annotations [invalid-annotation] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/aliases_type_statement.py:41:24-25: Could not find name `a` [unknown-name] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/aliases_type_statement.py:41:29-30: Could not find name `b` [unknown-name] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/aliases_type_statement.py:42:22-37: function call cannot be used in annotations [invalid-annotation] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/aliases_type_statement.py:43:22-30: invalid subscript expression cannot be used in annotations [invalid-annotation] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/aliases_type_statement.py:44:22-43: if expression cannot be used in annotations [invalid-annotation] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/aliases_type_statement.py:45:22-26: Expected `BadTypeAlias9` to be a type alias, got `Literal[1]` [type-alias-error] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/aliases_type_statement.py:46:23-27: bool literal cannot be used in annotations [invalid-annotation] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/aliases_type_statement.py:47:23-24: number literal cannot be used in annotations [invalid-annotation] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/aliases_type_statement.py:48:23-34: boolean operation cannot be used in annotations [invalid-annotation] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/aliases_type_statement.py:49:23-33: f-string cannot be used in annotations [invalid-annotation] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/aliases_type_statement.py:56:5-30: `type` statement is not allowed in this context [invalid-syntax] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/aliases_type_statement.py:62:15-25: Type parameters used in `TA1` but not declared [invalid-type-var] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/aliases_type_statement.py:67:12-20: Type parameters used in `TA2` but not declared [invalid-type-var] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/aliases_type_statement.py:77:7-41: Type `str` is not assignable to upper bound `int` of type variable `S` [bad-specialization] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/aliases_type_statement.py:79:7-41: Type `int` is not assignable to upper bound `str` of type variable `T` [bad-specialization] +ERROR aliases_type_statement.py:17:1-21: Object of class `TypeAliasType` has no attribute `bit_count` [missing-attribute] +ERROR aliases_type_statement.py:19:1-11: Expected a callable, got TypeAlias[GoodAlias1, type[int]] [not-callable] +ERROR aliases_type_statement.py:23:7-30: Object of class `TypeAliasType` has no attribute `other_attrib` [missing-attribute] +ERROR aliases_type_statement.py:31:22-32: Expected class object, got `TypeAliasType` [invalid-argument] +ERROR aliases_type_statement.py:37:22-62: function call cannot be used in annotations [invalid-annotation] +ERROR aliases_type_statement.py:38:22-32: list literal cannot be used in annotations [invalid-annotation] +ERROR aliases_type_statement.py:39:22-35: tuple literal cannot be used in annotations [invalid-annotation] +ERROR aliases_type_statement.py:40:22-45: list comprehension cannot be used in annotations [invalid-annotation] +ERROR aliases_type_statement.py:41:22-32: dict literal cannot be used in annotations [invalid-annotation] +ERROR aliases_type_statement.py:41:24-25: Could not find name `a` [unknown-name] +ERROR aliases_type_statement.py:41:29-30: Could not find name `b` [unknown-name] +ERROR aliases_type_statement.py:42:22-37: function call cannot be used in annotations [invalid-annotation] +ERROR aliases_type_statement.py:43:22-30: invalid subscript expression cannot be used in annotations [invalid-annotation] +ERROR aliases_type_statement.py:44:22-43: if expression cannot be used in annotations [invalid-annotation] +ERROR aliases_type_statement.py:45:22-26: Expected `BadTypeAlias9` to be a type alias, got `Literal[1]` [type-alias-error] +ERROR aliases_type_statement.py:46:23-27: bool literal cannot be used in annotations [invalid-annotation] +ERROR aliases_type_statement.py:47:23-24: number literal cannot be used in annotations [invalid-annotation] +ERROR aliases_type_statement.py:48:23-34: boolean operation cannot be used in annotations [invalid-annotation] +ERROR aliases_type_statement.py:49:23-33: f-string cannot be used in annotations [invalid-annotation] +ERROR aliases_type_statement.py:56:5-30: `type` statement is not allowed in this context [invalid-syntax] +ERROR aliases_type_statement.py:62:15-25: Type parameters used in `TA1` but not declared [invalid-type-var] +ERROR aliases_type_statement.py:67:12-20: Type parameters used in `TA2` but not declared [invalid-type-var] +ERROR aliases_type_statement.py:77:7-41: Type `str` is not assignable to upper bound `int` of type variable `S` [bad-specialization] +ERROR aliases_type_statement.py:79:7-41: Type `int` is not assignable to upper bound `str` of type variable `T` [bad-specialization] """ diff --git a/conformance/results/pyrefly/aliases_typealiastype.toml b/conformance/results/pyrefly/aliases_typealiastype.toml index 1ba0492e..80989c4c 100644 --- a/conformance/results/pyrefly/aliases_typealiastype.toml +++ b/conformance/results/pyrefly/aliases_typealiastype.toml @@ -29,21 +29,21 @@ Line 38: Unexpected errors ['Expected a type form, got instance of `GenericAlias Line 39: Unexpected errors ['Expected a type form, got instance of `GenericAlias` [not-a-type]', 'Expected an iterable, got `type[tuple[int, str, int]]` [not-iterable]'] """ output = """ -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/aliases_typealiastype.py:17:63-67: Argument `tuple[type[TypeVar[T]]]` is not assignable to parameter `type_params` with type `tuple[ParamSpec | TypeVar | TypeVarTuple, ...]` in function `typing.TypeAliasType.__new__` [bad-argument-type] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/aliases_typealiastype.py:18:73-79: Argument `tuple[type[TypeVar[S]], type[TypeVar[T]]]` is not assignable to parameter `type_params` with type `tuple[ParamSpec | TypeVar | TypeVarTuple, ...]` in function `typing.TypeAliasType.__new__` [bad-argument-type] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/aliases_typealiastype.py:19:81-85: Argument `tuple[type[TypeVar[T]]]` is not assignable to parameter `type_params` with type `tuple[ParamSpec | TypeVar | TypeVarTuple, ...]` in function `typing.TypeAliasType.__new__` [bad-argument-type] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/aliases_typealiastype.py:22:40-64: Expected a type form, got instance of `Literal['GoodAlias5[S, TStr, P]']` [not-a-type] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/aliases_typealiastype.py:23:17-33: Argument `tuple[type[TypeVar[S]], type[TypeVar[TStr]], type[ParamSpec[P]], type[TypeVarTuple[Ts]]]` is not assignable to parameter `type_params` with type `tuple[ParamSpec | TypeVar | TypeVarTuple, ...]` in function `typing.TypeAliasType.__new__` [bad-argument-type] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/aliases_typealiastype.py:32:7-30: Object of class `TypeAliasType` has no attribute `other_attrib` [missing-attribute] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/aliases_typealiastype.py:35:5-20: Expected a type form, got instance of `GenericAlias` [not-a-type] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/aliases_typealiastype.py:36:5-20: Expected a type form, got instance of `GenericAlias` [not-a-type] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/aliases_typealiastype.py:37:5-40: Expected a type form, got instance of `GenericAlias` [not-a-type] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/aliases_typealiastype.py:38:5-40: Expected a type form, got instance of `GenericAlias` [not-a-type] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/aliases_typealiastype.py:39:5-60: Expected a type form, got instance of `GenericAlias` [not-a-type] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/aliases_typealiastype.py:39:16-59: Expected an iterable, got `type[tuple[int, str, int]]` [not-iterable] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/aliases_typealiastype.py:40:5-30: Expected a type form, got instance of `GenericAlias` [not-a-type] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/aliases_typealiastype.py:43:61-65: Argument `tuple[type[TypeVar[T]]]` is not assignable to parameter `type_params` with type `tuple[ParamSpec | TypeVar | TypeVarTuple, ...]` in function `typing.TypeAliasType.__new__` [bad-argument-type] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/aliases_typealiastype.py:45:57-65: Argument `tuple[type[TypeVar[S]], type[TypeVar[T]]]` is not assignable to parameter `type_params` with type `tuple[ParamSpec | TypeVar | TypeVarTuple, ...]` in function `typing.TypeAliasType.__new__` [bad-argument-type] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/aliases_typealiastype.py:47:74-78: Argument `tuple[type[TypeVar[T]]]` is not assignable to parameter `type_params` with type `tuple[ParamSpec | TypeVar | TypeVarTuple, ...]` in function `typing.TypeAliasType.__new__` [bad-argument-type] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/aliases_typealiastype.py:66:47-57: `BadAlias21` is uninitialized [unbound-name] +ERROR aliases_typealiastype.py:17:63-67: Argument `tuple[type[TypeVar[T]]]` is not assignable to parameter `type_params` with type `tuple[ParamSpec | TypeVar | TypeVarTuple, ...]` in function `typing.TypeAliasType.__new__` [bad-argument-type] +ERROR aliases_typealiastype.py:18:73-79: Argument `tuple[type[TypeVar[S]], type[TypeVar[T]]]` is not assignable to parameter `type_params` with type `tuple[ParamSpec | TypeVar | TypeVarTuple, ...]` in function `typing.TypeAliasType.__new__` [bad-argument-type] +ERROR aliases_typealiastype.py:19:81-85: Argument `tuple[type[TypeVar[T]]]` is not assignable to parameter `type_params` with type `tuple[ParamSpec | TypeVar | TypeVarTuple, ...]` in function `typing.TypeAliasType.__new__` [bad-argument-type] +ERROR aliases_typealiastype.py:22:40-64: Expected a type form, got instance of `Literal['GoodAlias5[S, TStr, P]']` [not-a-type] +ERROR aliases_typealiastype.py:23:17-33: Argument `tuple[type[TypeVar[S]], type[TypeVar[TStr]], type[ParamSpec[P]], type[TypeVarTuple[Ts]]]` is not assignable to parameter `type_params` with type `tuple[ParamSpec | TypeVar | TypeVarTuple, ...]` in function `typing.TypeAliasType.__new__` [bad-argument-type] +ERROR aliases_typealiastype.py:32:7-30: Object of class `TypeAliasType` has no attribute `other_attrib` [missing-attribute] +ERROR aliases_typealiastype.py:35:5-20: Expected a type form, got instance of `GenericAlias` [not-a-type] +ERROR aliases_typealiastype.py:36:5-20: Expected a type form, got instance of `GenericAlias` [not-a-type] +ERROR aliases_typealiastype.py:37:5-40: Expected a type form, got instance of `GenericAlias` [not-a-type] +ERROR aliases_typealiastype.py:38:5-40: Expected a type form, got instance of `GenericAlias` [not-a-type] +ERROR aliases_typealiastype.py:39:5-60: Expected a type form, got instance of `GenericAlias` [not-a-type] +ERROR aliases_typealiastype.py:39:16-59: Expected an iterable, got `type[tuple[int, str, int]]` [not-iterable] +ERROR aliases_typealiastype.py:40:5-30: Expected a type form, got instance of `GenericAlias` [not-a-type] +ERROR aliases_typealiastype.py:43:61-65: Argument `tuple[type[TypeVar[T]]]` is not assignable to parameter `type_params` with type `tuple[ParamSpec | TypeVar | TypeVarTuple, ...]` in function `typing.TypeAliasType.__new__` [bad-argument-type] +ERROR aliases_typealiastype.py:45:57-65: Argument `tuple[type[TypeVar[S]], type[TypeVar[T]]]` is not assignable to parameter `type_params` with type `tuple[ParamSpec | TypeVar | TypeVarTuple, ...]` in function `typing.TypeAliasType.__new__` [bad-argument-type] +ERROR aliases_typealiastype.py:47:74-78: Argument `tuple[type[TypeVar[T]]]` is not assignable to parameter `type_params` with type `tuple[ParamSpec | TypeVar | TypeVarTuple, ...]` in function `typing.TypeAliasType.__new__` [bad-argument-type] +ERROR aliases_typealiastype.py:66:47-57: `BadAlias21` is uninitialized [unbound-name] """ diff --git a/conformance/results/pyrefly/annotations_coroutines.toml b/conformance/results/pyrefly/annotations_coroutines.toml index cdd4d0cd..be211bd5 100644 --- a/conformance/results/pyrefly/annotations_coroutines.toml +++ b/conformance/results/pyrefly/annotations_coroutines.toml @@ -1,3 +1,4 @@ +conformant = "Pass" conformance_automated = "Pass" errors_diff = """ """ diff --git a/conformance/results/pyrefly/annotations_forward_refs.toml b/conformance/results/pyrefly/annotations_forward_refs.toml index 59fcdaa3..f15a1fe4 100644 --- a/conformance/results/pyrefly/annotations_forward_refs.toml +++ b/conformance/results/pyrefly/annotations_forward_refs.toml @@ -14,23 +14,23 @@ Line 87: Unexpected errors ['Expected a type form, got instance of `(self: Self@ Line 96: Unexpected errors ['assert_type(Any, int) failed [assert-type]'] """ output = """ -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/annotations_forward_refs.py:41:10-50: function call cannot be used in annotations [invalid-annotation] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/annotations_forward_refs.py:42:10-20: list literal cannot be used in annotations [invalid-annotation] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/annotations_forward_refs.py:43:10-20: tuple literal cannot be used in annotations [invalid-annotation] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/annotations_forward_refs.py:44:10-33: list comprehension cannot be used in annotations [invalid-annotation] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/annotations_forward_refs.py:45:10-12: dict literal cannot be used in annotations [invalid-annotation] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/annotations_forward_refs.py:46:10-26: function call cannot be used in annotations [invalid-annotation] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/annotations_forward_refs.py:47:10-18: invalid subscript expression cannot be used in annotations [invalid-annotation] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/annotations_forward_refs.py:48:10-31: if expression cannot be used in annotations [invalid-annotation] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/annotations_forward_refs.py:49:10-14: Expected a type form, got instance of `Literal[1]` [not-a-type] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/annotations_forward_refs.py:50:11-15: bool literal cannot be used in annotations [invalid-annotation] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/annotations_forward_refs.py:51:11-12: number literal cannot be used in annotations [invalid-annotation] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/annotations_forward_refs.py:52:11-13: unary operation cannot be used in annotations [invalid-annotation] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/annotations_forward_refs.py:53:11-21: boolean operation cannot be used in annotations [invalid-annotation] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/annotations_forward_refs.py:54:11-17: f-string cannot be used in annotations [invalid-annotation] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/annotations_forward_refs.py:55:11-16: Expected a type form, got instance of `Module[types]` [not-a-type] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/annotations_forward_refs.py:80:14-20: Could not find name `ClassF` [unknown-name] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/annotations_forward_refs.py:87:9-12: Expected a type form, got instance of `(self: Self@ClassD) -> None` [not-a-type] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/annotations_forward_refs.py:89:8-11: Expected a type form, got instance of `(self: Self@ClassD) -> None` [not-a-type] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/annotations_forward_refs.py:96:12-27: assert_type(Any, int) failed [assert-type] +ERROR annotations_forward_refs.py:41:10-50: function call cannot be used in annotations [invalid-annotation] +ERROR annotations_forward_refs.py:42:10-20: list literal cannot be used in annotations [invalid-annotation] +ERROR annotations_forward_refs.py:43:10-20: tuple literal cannot be used in annotations [invalid-annotation] +ERROR annotations_forward_refs.py:44:10-33: list comprehension cannot be used in annotations [invalid-annotation] +ERROR annotations_forward_refs.py:45:10-12: dict literal cannot be used in annotations [invalid-annotation] +ERROR annotations_forward_refs.py:46:10-26: function call cannot be used in annotations [invalid-annotation] +ERROR annotations_forward_refs.py:47:10-18: invalid subscript expression cannot be used in annotations [invalid-annotation] +ERROR annotations_forward_refs.py:48:10-31: if expression cannot be used in annotations [invalid-annotation] +ERROR annotations_forward_refs.py:49:10-14: Expected a type form, got instance of `Literal[1]` [not-a-type] +ERROR annotations_forward_refs.py:50:11-15: bool literal cannot be used in annotations [invalid-annotation] +ERROR annotations_forward_refs.py:51:11-12: number literal cannot be used in annotations [invalid-annotation] +ERROR annotations_forward_refs.py:52:11-13: unary operation cannot be used in annotations [invalid-annotation] +ERROR annotations_forward_refs.py:53:11-21: boolean operation cannot be used in annotations [invalid-annotation] +ERROR annotations_forward_refs.py:54:11-17: f-string cannot be used in annotations [invalid-annotation] +ERROR annotations_forward_refs.py:55:11-16: Expected a type form, got instance of `Module[types]` [not-a-type] +ERROR annotations_forward_refs.py:80:14-20: Could not find name `ClassF` [unknown-name] +ERROR annotations_forward_refs.py:87:9-12: Expected a type form, got instance of `(self: Self@ClassD) -> None` [not-a-type] +ERROR annotations_forward_refs.py:89:8-11: Expected a type form, got instance of `(self: Self@ClassD) -> None` [not-a-type] +ERROR annotations_forward_refs.py:96:12-27: assert_type(Any, int) failed [assert-type] """ diff --git a/conformance/results/pyrefly/annotations_generators.toml b/conformance/results/pyrefly/annotations_generators.toml index 84f9fd22..5ab1f191 100644 --- a/conformance/results/pyrefly/annotations_generators.toml +++ b/conformance/results/pyrefly/annotations_generators.toml @@ -7,16 +7,16 @@ errors_diff = """ Line 190: Unexpected errors ['Expected to yield a value of type `int`, but a bare `yield` gives `None` instead [invalid-yield]'] """ output = """ -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/annotations_generators.py:51:21-39: Function declared to return `C`, but one or more paths are missing an explicit `return` [bad-return] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/annotations_generators.py:54:16-21: Returned type `Literal[False]` is not assignable to declared return type `C` [bad-return] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/annotations_generators.py:57:15-16: Type of yielded value `Literal[3]` is not assignable to declared return type `A` [invalid-yield] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/annotations_generators.py:66:15-16: Type of yielded value `Literal[3]` is not assignable to declared return type `A` [invalid-yield] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/annotations_generators.py:71:12-16: Returned type `Literal[True]` is not assignable to declared return type `None` [bad-return] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/annotations_generators.py:75:11-14: Type of yielded value `B` is not assignable to declared return type `A` [invalid-yield] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/annotations_generators.py:86:21-24: Generator function should return `Generator` [bad-return] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/annotations_generators.py:91:27-30: Async generator function should return `AsyncGenerator` [bad-return] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/annotations_generators.py:118:5-29: Cannot yield from a generator of type `Generator[A, None, None]` because it does not match the declared return type `Generator[B, None, Unknown]` [invalid-yield] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/annotations_generators.py:119:5-19: Cannot yield from a generator of type `Generator[int, None, None]` because it does not match the declared return type `Generator[B, None, Unknown]` [invalid-yield] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/annotations_generators.py:135:5-29: Cannot yield from a generator of type `Generator[None, int, None]` because it does not match the declared return type `Generator[None, str, Unknown]` [invalid-yield] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/annotations_generators.py:190:5-10: Expected to yield a value of type `int`, but a bare `yield` gives `None` instead [invalid-yield] +ERROR annotations_generators.py:51:21-39: Function declared to return `C`, but one or more paths are missing an explicit `return` [bad-return] +ERROR annotations_generators.py:54:16-21: Returned type `Literal[False]` is not assignable to declared return type `C` [bad-return] +ERROR annotations_generators.py:57:15-16: Type of yielded value `Literal[3]` is not assignable to declared return type `A` [invalid-yield] +ERROR annotations_generators.py:66:15-16: Type of yielded value `Literal[3]` is not assignable to declared return type `A` [invalid-yield] +ERROR annotations_generators.py:71:12-16: Returned type `Literal[True]` is not assignable to declared return type `None` [bad-return] +ERROR annotations_generators.py:75:11-14: Type of yielded value `B` is not assignable to declared return type `A` [invalid-yield] +ERROR annotations_generators.py:86:21-24: Generator function should return `Generator` [bad-return] +ERROR annotations_generators.py:91:27-30: Async generator function should return `AsyncGenerator` [bad-return] +ERROR annotations_generators.py:118:5-29: Cannot yield from a generator of type `Generator[A, None, None]` because it does not match the declared return type `Generator[B, None, Unknown]` [invalid-yield] +ERROR annotations_generators.py:119:5-19: Cannot yield from a generator of type `Generator[int, None, None]` because it does not match the declared return type `Generator[B, None, Unknown]` [invalid-yield] +ERROR annotations_generators.py:135:5-29: Cannot yield from a generator of type `Generator[None, int, None]` because it does not match the declared return type `Generator[None, str, Unknown]` [invalid-yield] +ERROR annotations_generators.py:190:5-10: Expected to yield a value of type `int`, but a bare `yield` gives `None` instead [invalid-yield] """ diff --git a/conformance/results/pyrefly/annotations_methods.toml b/conformance/results/pyrefly/annotations_methods.toml index e6ff9bd0..06e3f82f 100644 --- a/conformance/results/pyrefly/annotations_methods.toml +++ b/conformance/results/pyrefly/annotations_methods.toml @@ -1,6 +1,7 @@ +conformant = "Pass" conformance_automated = "Pass" errors_diff = """ """ output = """ -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/annotations_methods.py:42:12-28: assert_type(B, A) failed [assert-type] +ERROR annotations_methods.py:42:12-28: assert_type(B, A) failed [assert-type] """ diff --git a/conformance/results/pyrefly/annotations_typeexpr.toml b/conformance/results/pyrefly/annotations_typeexpr.toml index c9494e67..3411fda3 100644 --- a/conformance/results/pyrefly/annotations_typeexpr.toml +++ b/conformance/results/pyrefly/annotations_typeexpr.toml @@ -1,20 +1,21 @@ +conformant = "Pass" conformance_automated = "Pass" errors_diff = """ """ output = """ -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/annotations_typeexpr.py:88:9-49: function call cannot be used in annotations [invalid-annotation] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/annotations_typeexpr.py:89:9-19: list literal cannot be used in annotations [invalid-annotation] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/annotations_typeexpr.py:90:9-19: tuple literal cannot be used in annotations [invalid-annotation] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/annotations_typeexpr.py:91:9-32: list comprehension cannot be used in annotations [invalid-annotation] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/annotations_typeexpr.py:92:9-11: dict literal cannot be used in annotations [invalid-annotation] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/annotations_typeexpr.py:93:9-24: function call cannot be used in annotations [invalid-annotation] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/annotations_typeexpr.py:94:9-17: invalid subscript expression cannot be used in annotations [invalid-annotation] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/annotations_typeexpr.py:95:9-30: if expression cannot be used in annotations [invalid-annotation] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/annotations_typeexpr.py:96:9-13: Expected a type form, got instance of `Literal[3]` [not-a-type] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/annotations_typeexpr.py:97:10-14: bool literal cannot be used in annotations [invalid-annotation] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/annotations_typeexpr.py:98:10-11: number literal cannot be used in annotations [invalid-annotation] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/annotations_typeexpr.py:99:10-12: unary operation cannot be used in annotations [invalid-annotation] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/annotations_typeexpr.py:100:10-20: boolean operation cannot be used in annotations [invalid-annotation] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/annotations_typeexpr.py:101:10-16: f-string cannot be used in annotations [invalid-annotation] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/annotations_typeexpr.py:102:10-15: Expected a type form, got instance of `Module[types]` [not-a-type] +ERROR annotations_typeexpr.py:88:9-49: function call cannot be used in annotations [invalid-annotation] +ERROR annotations_typeexpr.py:89:9-19: list literal cannot be used in annotations [invalid-annotation] +ERROR annotations_typeexpr.py:90:9-19: tuple literal cannot be used in annotations [invalid-annotation] +ERROR annotations_typeexpr.py:91:9-32: list comprehension cannot be used in annotations [invalid-annotation] +ERROR annotations_typeexpr.py:92:9-11: dict literal cannot be used in annotations [invalid-annotation] +ERROR annotations_typeexpr.py:93:9-24: function call cannot be used in annotations [invalid-annotation] +ERROR annotations_typeexpr.py:94:9-17: invalid subscript expression cannot be used in annotations [invalid-annotation] +ERROR annotations_typeexpr.py:95:9-30: if expression cannot be used in annotations [invalid-annotation] +ERROR annotations_typeexpr.py:96:9-13: Expected a type form, got instance of `Literal[3]` [not-a-type] +ERROR annotations_typeexpr.py:97:10-14: bool literal cannot be used in annotations [invalid-annotation] +ERROR annotations_typeexpr.py:98:10-11: number literal cannot be used in annotations [invalid-annotation] +ERROR annotations_typeexpr.py:99:10-12: unary operation cannot be used in annotations [invalid-annotation] +ERROR annotations_typeexpr.py:100:10-20: boolean operation cannot be used in annotations [invalid-annotation] +ERROR annotations_typeexpr.py:101:10-16: f-string cannot be used in annotations [invalid-annotation] +ERROR annotations_typeexpr.py:102:10-15: Expected a type form, got instance of `Module[types]` [not-a-type] """ diff --git a/conformance/results/pyrefly/callables_annotation.toml b/conformance/results/pyrefly/callables_annotation.toml index fb005768..c31b3502 100644 --- a/conformance/results/pyrefly/callables_annotation.toml +++ b/conformance/results/pyrefly/callables_annotation.toml @@ -8,24 +8,24 @@ Line 156: Unexpected errors ['`Proto4[Ellipsis]` is not assignable to `Proto3` [ Line 157: Unexpected errors ['`Proto7` is not assignable to `Proto6` [bad-assignment]'] """ output = """ -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/callables_annotation.py:25:7-10: Expected 1 more positional argument [bad-argument-count] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/callables_annotation.py:26:11-12: Argument `Literal[2]` is not assignable to parameter with type `str` [bad-argument-type] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/callables_annotation.py:27:15-16: Expected 2 positional arguments, got 3 [bad-argument-count] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/callables_annotation.py:29:8-9: Unexpected keyword argument `a` [unexpected-keyword] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/callables_annotation.py:29:8-11: Expected 2 more positional arguments [bad-argument-count] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/callables_annotation.py:29:13-14: Unexpected keyword argument `b` [unexpected-keyword] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/callables_annotation.py:35:8-9: Expected 0 positional arguments, got 1 [bad-argument-count] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/callables_annotation.py:55:5-18: `Callable` requires exactly two arguments but 1 was found [bad-specialization] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/callables_annotation.py:56:14-17: Callable types can only have `ParamSpec` in this position, got `int` [bad-specialization] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/callables_annotation.py:57:18-23: Expected a type form, got instance of `list[type[int]]` [not-a-type] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/callables_annotation.py:58:5-28: `Callable` requires exactly two arguments but 3 was found [bad-specialization] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/callables_annotation.py:59:15-18: Invalid position for `...` [invalid-argument] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/callables_annotation.py:91:7-15: `() -> str` is not assignable to variable `cb3` with type `(int, ...) -> str` [bad-assignment] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/callables_annotation.py:93:7-15: `(*, a: int) -> str` is not assignable to variable `cb3` with type `(int, ...) -> str` [bad-assignment] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/callables_annotation.py:156:20-22: `Proto4[Ellipsis]` is not assignable to `Proto3` [bad-assignment] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/callables_annotation.py:157:20-22: `Proto7` is not assignable to `Proto6` [bad-assignment] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/callables_annotation.py:159:25-27: `Proto8` is not assignable to `Proto5[Any]` [bad-assignment] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/callables_annotation.py:172:26-29: `() -> str` is not assignable to `(int, ...) -> str` [bad-assignment] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/callables_annotation.py:187:48-50: `(int, str) -> str` is not assignable to `(str, ...) -> str` [bad-assignment] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/callables_annotation.py:189:32-34: `(int, str) -> str` is not assignable to `(str, ...) -> str` [bad-assignment] +ERROR callables_annotation.py:25:7-10: Expected 1 more positional argument [bad-argument-count] +ERROR callables_annotation.py:26:11-12: Argument `Literal[2]` is not assignable to parameter with type `str` [bad-argument-type] +ERROR callables_annotation.py:27:15-16: Expected 2 positional arguments, got 3 [bad-argument-count] +ERROR callables_annotation.py:29:8-9: Unexpected keyword argument `a` [unexpected-keyword] +ERROR callables_annotation.py:29:8-11: Expected 2 more positional arguments [bad-argument-count] +ERROR callables_annotation.py:29:13-14: Unexpected keyword argument `b` [unexpected-keyword] +ERROR callables_annotation.py:35:8-9: Expected 0 positional arguments, got 1 [bad-argument-count] +ERROR callables_annotation.py:55:5-18: `Callable` requires exactly two arguments but 1 was found [bad-specialization] +ERROR callables_annotation.py:56:14-17: Callable types can only have `ParamSpec` in this position, got `int` [bad-specialization] +ERROR callables_annotation.py:57:18-23: Expected a type form, got instance of `list[type[int]]` [not-a-type] +ERROR callables_annotation.py:58:5-28: `Callable` requires exactly two arguments but 3 was found [bad-specialization] +ERROR callables_annotation.py:59:15-18: Invalid position for `...` [invalid-argument] +ERROR callables_annotation.py:91:7-15: `() -> str` is not assignable to variable `cb3` with type `(int, ...) -> str` [bad-assignment] +ERROR callables_annotation.py:93:7-15: `(*, a: int) -> str` is not assignable to variable `cb3` with type `(int, ...) -> str` [bad-assignment] +ERROR callables_annotation.py:156:20-22: `Proto4[Ellipsis]` is not assignable to `Proto3` [bad-assignment] +ERROR callables_annotation.py:157:20-22: `Proto7` is not assignable to `Proto6` [bad-assignment] +ERROR callables_annotation.py:159:25-27: `Proto8` is not assignable to `Proto5[Any]` [bad-assignment] +ERROR callables_annotation.py:172:26-29: `() -> str` is not assignable to `(int, ...) -> str` [bad-assignment] +ERROR callables_annotation.py:187:48-50: `(int, str) -> str` is not assignable to `(str, ...) -> str` [bad-assignment] +ERROR callables_annotation.py:189:32-34: `(int, str) -> str` is not assignable to `(str, ...) -> str` [bad-assignment] """ diff --git a/conformance/results/pyrefly/callables_kwargs.toml b/conformance/results/pyrefly/callables_kwargs.toml index e58b0006..7e70cf52 100644 --- a/conformance/results/pyrefly/callables_kwargs.toml +++ b/conformance/results/pyrefly/callables_kwargs.toml @@ -7,23 +7,23 @@ errors_diff = """ Line 111: Expected 1 errors """ output = """ -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/callables_kwargs.py:46:10-12: Missing argument `v1` in function `func1` [missing-argument] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/callables_kwargs.py:46:10-12: Missing argument `v3` in function `func1` [missing-argument] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/callables_kwargs.py:51:32-34: Unexpected keyword argument `v4` in function `func1` [unexpected-keyword] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/callables_kwargs.py:52:11-12: Expected argument `v1` to be passed by name in function `func1` [unexpected-positional-argument] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/callables_kwargs.py:52:11-12: Expected 0 positional arguments, got 3 in function `func1` [bad-argument-count] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/callables_kwargs.py:52:14-16: Expected argument `v3` to be passed by name in function `func1` [unexpected-positional-argument] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/callables_kwargs.py:58:11-20: Unpacked keyword argument `str` is not assignable to parameter `v1` with type `int` in function `func1` [bad-argument-type] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/callables_kwargs.py:61:11-15: Unpacked keyword argument `int | str` is not assignable to parameter `v1` with type `int` in function `func1` [bad-argument-type] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/callables_kwargs.py:61:11-15: Unpacked keyword argument `int | str` is not assignable to parameter `v2` with type `str` in function `func1` [bad-argument-type] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/callables_kwargs.py:61:11-15: Unpacked keyword argument `int | str` is not assignable to parameter `v3` with type `str` in function `func1` [bad-argument-type] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/callables_kwargs.py:63:17-22: Multiple values for argument `v1` in function `func1` [bad-keyword-argument] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/callables_kwargs.py:64:11-12: Argument `Literal[1]` is not assignable to parameter `v3` with type `str` in function `func2` [bad-argument-type] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/callables_kwargs.py:64:14-19: Multiple values for argument `v3` in function `func2` [bad-keyword-argument] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/callables_kwargs.py:65:17-22: Multiple values for argument `v1` in function `func2` [bad-keyword-argument] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/callables_kwargs.py:101:19-24: `(**kwargs: Unpack[TypedDict[TD2]]) -> None` is not assignable to `TDProtocol3` [bad-assignment] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/callables_kwargs.py:102:19-24: `(**kwargs: Unpack[TypedDict[TD2]]) -> None` is not assignable to `TDProtocol4` [bad-assignment] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/callables_kwargs.py:103:19-24: `(**kwargs: Unpack[TypedDict[TD2]]) -> None` is not assignable to `TDProtocol5` [bad-assignment] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/callables_kwargs.py:122:21-30: `Unpack` in **kwargs annotation must be used only with a `TypedDict` [invalid-annotation] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/callables_kwargs.py:134:19-24: `(*, v1: int, v3: str, v2: str = '') -> None` is not assignable to `TDProtocol6` [bad-assignment] +ERROR callables_kwargs.py:46:10-12: Missing argument `v1` in function `func1` [missing-argument] +ERROR callables_kwargs.py:46:10-12: Missing argument `v3` in function `func1` [missing-argument] +ERROR callables_kwargs.py:51:32-34: Unexpected keyword argument `v4` in function `func1` [unexpected-keyword] +ERROR callables_kwargs.py:52:11-12: Expected argument `v1` to be passed by name in function `func1` [unexpected-positional-argument] +ERROR callables_kwargs.py:52:11-12: Expected 0 positional arguments, got 3 in function `func1` [bad-argument-count] +ERROR callables_kwargs.py:52:14-16: Expected argument `v3` to be passed by name in function `func1` [unexpected-positional-argument] +ERROR callables_kwargs.py:58:11-20: Unpacked keyword argument `str` is not assignable to parameter `v1` with type `int` in function `func1` [bad-argument-type] +ERROR callables_kwargs.py:61:11-15: Unpacked keyword argument `int | str` is not assignable to parameter `v1` with type `int` in function `func1` [bad-argument-type] +ERROR callables_kwargs.py:61:11-15: Unpacked keyword argument `int | str` is not assignable to parameter `v2` with type `str` in function `func1` [bad-argument-type] +ERROR callables_kwargs.py:61:11-15: Unpacked keyword argument `int | str` is not assignable to parameter `v3` with type `str` in function `func1` [bad-argument-type] +ERROR callables_kwargs.py:63:17-22: Multiple values for argument `v1` in function `func1` [bad-keyword-argument] +ERROR callables_kwargs.py:64:11-12: Argument `Literal[1]` is not assignable to parameter `v3` with type `str` in function `func2` [bad-argument-type] +ERROR callables_kwargs.py:64:14-19: Multiple values for argument `v3` in function `func2` [bad-keyword-argument] +ERROR callables_kwargs.py:65:17-22: Multiple values for argument `v1` in function `func2` [bad-keyword-argument] +ERROR callables_kwargs.py:101:19-24: `(**kwargs: Unpack[TypedDict[TD2]]) -> None` is not assignable to `TDProtocol3` [bad-assignment] +ERROR callables_kwargs.py:102:19-24: `(**kwargs: Unpack[TypedDict[TD2]]) -> None` is not assignable to `TDProtocol4` [bad-assignment] +ERROR callables_kwargs.py:103:19-24: `(**kwargs: Unpack[TypedDict[TD2]]) -> None` is not assignable to `TDProtocol5` [bad-assignment] +ERROR callables_kwargs.py:122:21-30: `Unpack` in **kwargs annotation must be used only with a `TypedDict` [invalid-annotation] +ERROR callables_kwargs.py:134:19-24: `(*, v1: int, v3: str, v2: str = '') -> None` is not assignable to `TDProtocol6` [bad-assignment] """ diff --git a/conformance/results/pyrefly/callables_protocol.toml b/conformance/results/pyrefly/callables_protocol.toml index 027e769e..3bdc990b 100644 --- a/conformance/results/pyrefly/callables_protocol.toml +++ b/conformance/results/pyrefly/callables_protocol.toml @@ -1,22 +1,23 @@ +conformant = "Pass" conformance_automated = "Pass" errors_diff = """ """ output = """ -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/callables_protocol.py:35:7-15: `(*vals: bytes, *, max_items: int | None) -> list[bytes]` is not assignable to variable `cb1` with type `Proto1` [bad-assignment] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/callables_protocol.py:36:7-15: `(*vals: bytes) -> list[bytes]` is not assignable to variable `cb1` with type `Proto1` [bad-assignment] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/callables_protocol.py:37:7-15: `(*vals: bytes, *, max_len: str | None) -> list[bytes]` is not assignable to variable `cb1` with type `Proto1` [bad-assignment] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/callables_protocol.py:67:7-15: `(*a: bytes) -> None` is not assignable to variable `cb2` with type `Proto2` [bad-assignment] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/callables_protocol.py:68:7-15: `(*a: str, **b: str) -> None` is not assignable to variable `cb2` with type `Proto2` [bad-assignment] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/callables_protocol.py:69:7-15: `(*a: bytes, **b: bytes) -> None` is not assignable to variable `cb2` with type `Proto2` [bad-assignment] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/callables_protocol.py:70:7-15: `(**b: str) -> None` is not assignable to variable `cb2` with type `Proto2` [bad-assignment] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/callables_protocol.py:97:16-24: `(x: int) -> None` is not assignable to `Proto4` [bad-assignment] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/callables_protocol.py:121:18-26: `(*vals: bytes, *, max_len: int | None = None) -> list[bytes]` is not assignable to `NotProto6` [bad-assignment] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/callables_protocol.py:169:7-15: `(x: int) -> Any` is not assignable to variable `cb8` with type `Proto8` [bad-assignment] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/callables_protocol.py:186:33-38: `Literal['str']` is not assignable to attribute `other_attribute` with type `int` [bad-assignment] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/callables_protocol.py:187:5-18: Object of class `Proto9` has no attribute `xxx` [missing-attribute] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/callables_protocol.py:197:7-32: Object of class `Proto9` has no attribute `other_attribute2` [missing-attribute] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/callables_protocol.py:238:8-17: `(x: int, y: str, /) -> Any` is not assignable to variable `cb11` with type `Proto11` [bad-assignment] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/callables_protocol.py:260:8-17: `(*args: Any, *, kwarg0: Any) -> None` is not assignable to variable `cb12` with type `Proto12` [bad-assignment] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/callables_protocol.py:284:27-42: `(path: str) -> str` is not assignable to `Proto13_Default` [bad-assignment] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/callables_protocol.py:311:27-42: `(*, path: str) -> str` is not assignable to `Proto14_Default` [bad-assignment] +ERROR callables_protocol.py:35:7-15: `(*vals: bytes, *, max_items: int | None) -> list[bytes]` is not assignable to variable `cb1` with type `Proto1` [bad-assignment] +ERROR callables_protocol.py:36:7-15: `(*vals: bytes) -> list[bytes]` is not assignable to variable `cb1` with type `Proto1` [bad-assignment] +ERROR callables_protocol.py:37:7-15: `(*vals: bytes, *, max_len: str | None) -> list[bytes]` is not assignable to variable `cb1` with type `Proto1` [bad-assignment] +ERROR callables_protocol.py:67:7-15: `(*a: bytes) -> None` is not assignable to variable `cb2` with type `Proto2` [bad-assignment] +ERROR callables_protocol.py:68:7-15: `(*a: str, **b: str) -> None` is not assignable to variable `cb2` with type `Proto2` [bad-assignment] +ERROR callables_protocol.py:69:7-15: `(*a: bytes, **b: bytes) -> None` is not assignable to variable `cb2` with type `Proto2` [bad-assignment] +ERROR callables_protocol.py:70:7-15: `(**b: str) -> None` is not assignable to variable `cb2` with type `Proto2` [bad-assignment] +ERROR callables_protocol.py:97:16-24: `(x: int) -> None` is not assignable to `Proto4` [bad-assignment] +ERROR callables_protocol.py:121:18-26: `(*vals: bytes, *, max_len: int | None = None) -> list[bytes]` is not assignable to `NotProto6` [bad-assignment] +ERROR callables_protocol.py:169:7-15: `(x: int) -> Any` is not assignable to variable `cb8` with type `Proto8` [bad-assignment] +ERROR callables_protocol.py:186:33-38: `Literal['str']` is not assignable to attribute `other_attribute` with type `int` [bad-assignment] +ERROR callables_protocol.py:187:5-18: Object of class `Proto9` has no attribute `xxx` [missing-attribute] +ERROR callables_protocol.py:197:7-32: Object of class `Proto9` has no attribute `other_attribute2` [missing-attribute] +ERROR callables_protocol.py:238:8-17: `(x: int, y: str, /) -> Any` is not assignable to variable `cb11` with type `Proto11` [bad-assignment] +ERROR callables_protocol.py:260:8-17: `(*args: Any, *, kwarg0: Any) -> None` is not assignable to variable `cb12` with type `Proto12` [bad-assignment] +ERROR callables_protocol.py:284:27-42: `(path: str) -> str` is not assignable to `Proto13_Default` [bad-assignment] +ERROR callables_protocol.py:311:27-42: `(*, path: str) -> str` is not assignable to `Proto14_Default` [bad-assignment] """ diff --git a/conformance/results/pyrefly/callables_subtyping.toml b/conformance/results/pyrefly/callables_subtyping.toml index e97776ab..3a332c8c 100644 --- a/conformance/results/pyrefly/callables_subtyping.toml +++ b/conformance/results/pyrefly/callables_subtyping.toml @@ -1,37 +1,38 @@ +conformant = "Pass" conformance_automated = "Pass" errors_diff = """ """ output = """ -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/callables_subtyping.py:26:36-39: `(int) -> int` is not assignable to `(float) -> float` [bad-assignment] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/callables_subtyping.py:29:32-35: `(float) -> float` is not assignable to `(int) -> int` [bad-assignment] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/callables_subtyping.py:51:21-29: `PosOnly2` is not assignable to `Standard2` [bad-assignment] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/callables_subtyping.py:52:21-28: `KwOnly2` is not assignable to `Standard2` [bad-assignment] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/callables_subtyping.py:55:20-27: `KwOnly2` is not assignable to `PosOnly2` [bad-assignment] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/callables_subtyping.py:58:19-27: `PosOnly2` is not assignable to `KwOnly2` [bad-assignment] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/callables_subtyping.py:82:20-27: `NoArgs3` is not assignable to `IntArgs3` [bad-assignment] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/callables_subtyping.py:85:22-29: `NoArgs3` is not assignable to `FloatArgs3` [bad-assignment] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/callables_subtyping.py:86:22-30: `IntArgs3` is not assignable to `FloatArgs3` [bad-assignment] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/callables_subtyping.py:116:20-28: `IntArgs4` is not assignable to `PosOnly4` [bad-assignment] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/callables_subtyping.py:119:23-31: `StrArgs4` is not assignable to `IntStrArgs4` [bad-assignment] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/callables_subtyping.py:120:23-31: `IntArgs4` is not assignable to `IntStrArgs4` [bad-assignment] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/callables_subtyping.py:122:20-28: `IntArgs4` is not assignable to `StrArgs4` [bad-assignment] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/callables_subtyping.py:124:20-28: `StrArgs4` is not assignable to `IntArgs4` [bad-assignment] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/callables_subtyping.py:125:22-34: `IntStrArgs4` is not assignable to `Standard4` [bad-assignment] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/callables_subtyping.py:126:22-30: `StrArgs4` is not assignable to `Standard4` [bad-assignment] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/callables_subtyping.py:151:22-31: `NoKwargs5` is not assignable to `IntKwargs5` [bad-assignment] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/callables_subtyping.py:154:24-33: `NoKwargs5` is not assignable to `FloatKwargs5` [bad-assignment] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/callables_subtyping.py:155:24-34: `IntKwargs5` is not assignable to `FloatKwargs5` [bad-assignment] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/callables_subtyping.py:187:19-29: `IntKwargs6` is not assignable to `KwOnly6` [bad-assignment] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/callables_subtyping.py:190:25-35: `StrKwargs6` is not assignable to `IntStrKwargs6` [bad-assignment] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/callables_subtyping.py:191:25-35: `IntKwargs6` is not assignable to `IntStrKwargs6` [bad-assignment] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/callables_subtyping.py:193:22-32: `IntKwargs6` is not assignable to `StrKwargs6` [bad-assignment] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/callables_subtyping.py:195:22-32: `StrKwargs6` is not assignable to `IntKwargs6` [bad-assignment] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/callables_subtyping.py:196:22-36: `IntStrKwargs6` is not assignable to `Standard6` [bad-assignment] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/callables_subtyping.py:197:22-32: `StrKwargs6` is not assignable to `Standard6` [bad-assignment] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/callables_subtyping.py:236:23-37: `NoDefaultArg8` is not assignable to `DefaultArg8` [bad-assignment] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/callables_subtyping.py:237:23-27: `NoX8` is not assignable to `DefaultArg8` [bad-assignment] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/callables_subtyping.py:240:25-29: `NoX8` is not assignable to `NoDefaultArg8` [bad-assignment] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/callables_subtyping.py:243:16-30: `NoDefaultArg8` is not assignable to `NoX8` [bad-assignment] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/callables_subtyping.py:273:21-31: `Overloaded9` is not assignable to `FloatArg9` [bad-assignment] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/callables_subtyping.py:297:24-31: `StrArg10` is not assignable to `Overloaded10` [bad-assignment] +ERROR callables_subtyping.py:26:36-39: `(int) -> int` is not assignable to `(float) -> float` [bad-assignment] +ERROR callables_subtyping.py:29:32-35: `(float) -> float` is not assignable to `(int) -> int` [bad-assignment] +ERROR callables_subtyping.py:51:21-29: `PosOnly2` is not assignable to `Standard2` [bad-assignment] +ERROR callables_subtyping.py:52:21-28: `KwOnly2` is not assignable to `Standard2` [bad-assignment] +ERROR callables_subtyping.py:55:20-27: `KwOnly2` is not assignable to `PosOnly2` [bad-assignment] +ERROR callables_subtyping.py:58:19-27: `PosOnly2` is not assignable to `KwOnly2` [bad-assignment] +ERROR callables_subtyping.py:82:20-27: `NoArgs3` is not assignable to `IntArgs3` [bad-assignment] +ERROR callables_subtyping.py:85:22-29: `NoArgs3` is not assignable to `FloatArgs3` [bad-assignment] +ERROR callables_subtyping.py:86:22-30: `IntArgs3` is not assignable to `FloatArgs3` [bad-assignment] +ERROR callables_subtyping.py:116:20-28: `IntArgs4` is not assignable to `PosOnly4` [bad-assignment] +ERROR callables_subtyping.py:119:23-31: `StrArgs4` is not assignable to `IntStrArgs4` [bad-assignment] +ERROR callables_subtyping.py:120:23-31: `IntArgs4` is not assignable to `IntStrArgs4` [bad-assignment] +ERROR callables_subtyping.py:122:20-28: `IntArgs4` is not assignable to `StrArgs4` [bad-assignment] +ERROR callables_subtyping.py:124:20-28: `StrArgs4` is not assignable to `IntArgs4` [bad-assignment] +ERROR callables_subtyping.py:125:22-34: `IntStrArgs4` is not assignable to `Standard4` [bad-assignment] +ERROR callables_subtyping.py:126:22-30: `StrArgs4` is not assignable to `Standard4` [bad-assignment] +ERROR callables_subtyping.py:151:22-31: `NoKwargs5` is not assignable to `IntKwargs5` [bad-assignment] +ERROR callables_subtyping.py:154:24-33: `NoKwargs5` is not assignable to `FloatKwargs5` [bad-assignment] +ERROR callables_subtyping.py:155:24-34: `IntKwargs5` is not assignable to `FloatKwargs5` [bad-assignment] +ERROR callables_subtyping.py:187:19-29: `IntKwargs6` is not assignable to `KwOnly6` [bad-assignment] +ERROR callables_subtyping.py:190:25-35: `StrKwargs6` is not assignable to `IntStrKwargs6` [bad-assignment] +ERROR callables_subtyping.py:191:25-35: `IntKwargs6` is not assignable to `IntStrKwargs6` [bad-assignment] +ERROR callables_subtyping.py:193:22-32: `IntKwargs6` is not assignable to `StrKwargs6` [bad-assignment] +ERROR callables_subtyping.py:195:22-32: `StrKwargs6` is not assignable to `IntKwargs6` [bad-assignment] +ERROR callables_subtyping.py:196:22-36: `IntStrKwargs6` is not assignable to `Standard6` [bad-assignment] +ERROR callables_subtyping.py:197:22-32: `StrKwargs6` is not assignable to `Standard6` [bad-assignment] +ERROR callables_subtyping.py:236:23-37: `NoDefaultArg8` is not assignable to `DefaultArg8` [bad-assignment] +ERROR callables_subtyping.py:237:23-27: `NoX8` is not assignable to `DefaultArg8` [bad-assignment] +ERROR callables_subtyping.py:240:25-29: `NoX8` is not assignable to `NoDefaultArg8` [bad-assignment] +ERROR callables_subtyping.py:243:16-30: `NoDefaultArg8` is not assignable to `NoX8` [bad-assignment] +ERROR callables_subtyping.py:273:21-31: `Overloaded9` is not assignable to `FloatArg9` [bad-assignment] +ERROR callables_subtyping.py:297:24-31: `StrArg10` is not assignable to `Overloaded10` [bad-assignment] """ diff --git a/conformance/results/pyrefly/classes_classvar.toml b/conformance/results/pyrefly/classes_classvar.toml index 923b87dd..c33207e4 100644 --- a/conformance/results/pyrefly/classes_classvar.toml +++ b/conformance/results/pyrefly/classes_classvar.toml @@ -1,26 +1,27 @@ +conformant = "Pass" conformance_automated = "Pass" errors_diff = """ """ output = """ -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/classes_classvar.py:38:11-29: Expected 1 type argument for `ClassVar`, got 2 [invalid-annotation] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/classes_classvar.py:39:14-15: number literal cannot be used in annotations [invalid-annotation] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/classes_classvar.py:40:14-17: Could not find name `var` [unknown-name] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/classes_classvar.py:45:20-21: `ClassVar` arguments may not contain any type variables [invalid-annotation] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/classes_classvar.py:46:20-27: `ClassVar` arguments may not contain any type variables [invalid-annotation] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/classes_classvar.py:47:20-36: `ClassVar` arguments may not contain any type variables [invalid-annotation] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/classes_classvar.py:52:33-35: `dict[@_, @_]` is not assignable to `list[str]` [bad-assignment] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/classes_classvar.py:54:17-30: `ClassVar` may not be nested inside `Final` [invalid-annotation] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/classes_classvar.py:55:17-30: `ClassVar` is not allowed in this context [invalid-annotation] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/classes_classvar.py:69:26-34: `ClassVar` is only allowed inside a class body [invalid-annotation] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/classes_classvar.py:69:26-39: `ClassVar` is not allowed in this context [invalid-annotation] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/classes_classvar.py:70:12-20: `ClassVar` is only allowed inside a class body [invalid-annotation] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/classes_classvar.py:70:12-25: `ClassVar` is not allowed in this context [invalid-annotation] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/classes_classvar.py:71:9-16: Cannot set field `xx` [read-only] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/classes_classvar.py:73:26-34: `ClassVar` is only allowed inside a class body [invalid-annotation] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/classes_classvar.py:73:26-39: `ClassVar` is not allowed in this context [invalid-annotation] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/classes_classvar.py:77:8-16: `ClassVar` is only allowed inside a class body [invalid-annotation] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/classes_classvar.py:77:8-21: `ClassVar` is not allowed in this context [invalid-annotation] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/classes_classvar.py:78:20-33: `ClassVar` is not allowed in this context [invalid-annotation] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/classes_classvar.py:111:1-19: Cannot set field `stats` [read-only] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/classes_classvar.py:140:13-25: `ProtoAImpl` is not assignable to `ProtoA` [bad-assignment] +ERROR classes_classvar.py:38:11-29: Expected 1 type argument for `ClassVar`, got 2 [invalid-annotation] +ERROR classes_classvar.py:39:14-15: number literal cannot be used in annotations [invalid-annotation] +ERROR classes_classvar.py:40:14-17: Could not find name `var` [unknown-name] +ERROR classes_classvar.py:45:20-21: `ClassVar` arguments may not contain any type variables [invalid-annotation] +ERROR classes_classvar.py:46:20-27: `ClassVar` arguments may not contain any type variables [invalid-annotation] +ERROR classes_classvar.py:47:20-36: `ClassVar` arguments may not contain any type variables [invalid-annotation] +ERROR classes_classvar.py:52:33-35: `dict[@_, @_]` is not assignable to `list[str]` [bad-assignment] +ERROR classes_classvar.py:54:17-30: `ClassVar` may not be nested inside `Final` [invalid-annotation] +ERROR classes_classvar.py:55:17-30: `ClassVar` is not allowed in this context [invalid-annotation] +ERROR classes_classvar.py:69:26-34: `ClassVar` is only allowed inside a class body [invalid-annotation] +ERROR classes_classvar.py:69:26-39: `ClassVar` is not allowed in this context [invalid-annotation] +ERROR classes_classvar.py:70:12-20: `ClassVar` is only allowed inside a class body [invalid-annotation] +ERROR classes_classvar.py:70:12-25: `ClassVar` is not allowed in this context [invalid-annotation] +ERROR classes_classvar.py:71:9-16: Cannot set field `xx` [read-only] +ERROR classes_classvar.py:73:26-34: `ClassVar` is only allowed inside a class body [invalid-annotation] +ERROR classes_classvar.py:73:26-39: `ClassVar` is not allowed in this context [invalid-annotation] +ERROR classes_classvar.py:77:8-16: `ClassVar` is only allowed inside a class body [invalid-annotation] +ERROR classes_classvar.py:77:8-21: `ClassVar` is not allowed in this context [invalid-annotation] +ERROR classes_classvar.py:78:20-33: `ClassVar` is not allowed in this context [invalid-annotation] +ERROR classes_classvar.py:111:1-19: Cannot set field `stats` [read-only] +ERROR classes_classvar.py:140:13-25: `ProtoAImpl` is not assignable to `ProtoA` [bad-assignment] """ diff --git a/conformance/results/pyrefly/classes_override.toml b/conformance/results/pyrefly/classes_override.toml index 9fee418e..cb376ba0 100644 --- a/conformance/results/pyrefly/classes_override.toml +++ b/conformance/results/pyrefly/classes_override.toml @@ -1,10 +1,11 @@ +conformant = "Pass" conformance_automated = "Pass" errors_diff = """ """ output = """ -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/classes_override.py:53:9-16: Class member `ChildA.method3` is marked as an override, but no parent class has a matching attribute [bad-override] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/classes_override.py:57:9-16: Class member `ChildA.method4` is marked as an override, but no parent class has a matching attribute [bad-override] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/classes_override.py:79:9-23: Class member `ChildA.static_method1` is marked as an override, but no parent class has a matching attribute [bad-override] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/classes_override.py:84:9-22: Class member `ChildA.class_method1` is marked as an override, but no parent class has a matching attribute [bad-override] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/classes_override.py:89:9-18: Class member `ChildA.property1` is marked as an override, but no parent class has a matching attribute [bad-override] +ERROR classes_override.py:53:9-16: Class member `ChildA.method3` is marked as an override, but no parent class has a matching attribute [bad-override] +ERROR classes_override.py:57:9-16: Class member `ChildA.method4` is marked as an override, but no parent class has a matching attribute [bad-override] +ERROR classes_override.py:79:9-23: Class member `ChildA.static_method1` is marked as an override, but no parent class has a matching attribute [bad-override] +ERROR classes_override.py:84:9-22: Class member `ChildA.class_method1` is marked as an override, but no parent class has a matching attribute [bad-override] +ERROR classes_override.py:89:9-18: Class member `ChildA.property1` is marked as an override, but no parent class has a matching attribute [bad-override] """ diff --git a/conformance/results/pyrefly/constructors_call_init.toml b/conformance/results/pyrefly/constructors_call_init.toml index eb8a3f96..01d35f16 100644 --- a/conformance/results/pyrefly/constructors_call_init.toml +++ b/conformance/results/pyrefly/constructors_call_init.toml @@ -7,8 +7,8 @@ errors_diff = """ Line 107: Expected 1 errors """ output = """ -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/constructors_call_init.py:21:13-16: Argument `float` is not assignable to parameter `x` with type `int` in function `Class1.__init__` [bad-argument-type] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/constructors_call_init.py:42:8-20: Argument `Class2[@_]` is not assignable to parameter `x` with type `Class3 | None` in function `Class2.__init__` [bad-argument-type] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/constructors_call_init.py:56:12-14: Argument `Class4[str]` is not assignable to parameter `self` with type `Class4[int]` in function `Class4.__init__` [bad-argument-type] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/constructors_call_init.py:130:9-10: Expected 0 positional arguments, got 1 in function `object.__init__` [bad-argument-count] +ERROR constructors_call_init.py:21:13-16: Argument `float` is not assignable to parameter `x` with type `int` in function `Class1.__init__` [bad-argument-type] +ERROR constructors_call_init.py:42:8-20: Argument `Class2[@_]` is not assignable to parameter `x` with type `Class3 | None` in function `Class2.__init__` [bad-argument-type] +ERROR constructors_call_init.py:56:12-14: Argument `Class4[str]` is not assignable to parameter `self` with type `Class4[int]` in function `Class4.__init__` [bad-argument-type] +ERROR constructors_call_init.py:130:9-10: Expected 0 positional arguments, got 1 in function `object.__init__` [bad-argument-count] """ diff --git a/conformance/results/pyrefly/constructors_call_metaclass.toml b/conformance/results/pyrefly/constructors_call_metaclass.toml index 3489e9c9..44d131a2 100644 --- a/conformance/results/pyrefly/constructors_call_metaclass.toml +++ b/conformance/results/pyrefly/constructors_call_metaclass.toml @@ -1,7 +1,8 @@ +conformant = "Pass" conformance_automated = "Pass" errors_diff = """ """ output = """ -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/constructors_call_metaclass.py:51:7-9: Missing argument `x` in function `Class3.__new__` [missing-argument] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/constructors_call_metaclass.py:65:7-9: Missing argument `x` in function `Class4.__new__` [missing-argument] +ERROR constructors_call_metaclass.py:51:7-9: Missing argument `x` in function `Class3.__new__` [missing-argument] +ERROR constructors_call_metaclass.py:65:7-9: Missing argument `x` in function `Class4.__new__` [missing-argument] """ diff --git a/conformance/results/pyrefly/constructors_call_new.toml b/conformance/results/pyrefly/constructors_call_new.toml index 53092d1e..690a7213 100644 --- a/conformance/results/pyrefly/constructors_call_new.toml +++ b/conformance/results/pyrefly/constructors_call_new.toml @@ -1,7 +1,8 @@ +conformant = "Pass" conformance_automated = "Pass" errors_diff = """ """ output = """ -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/constructors_call_new.py:21:13-16: Argument `float` is not assignable to parameter `x` with type `int` in function `Class1.__new__` [bad-argument-type] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/constructors_call_new.py:145:13-15: Argument `type[Class11[str]]` is not assignable to parameter `cls` with type `type[Class11[int]]` in function `Class11.__new__` [bad-argument-type] +ERROR constructors_call_new.py:21:13-16: Argument `float` is not assignable to parameter `x` with type `int` in function `Class1.__new__` [bad-argument-type] +ERROR constructors_call_new.py:145:13-15: Argument `type[Class11[str]]` is not assignable to parameter `cls` with type `type[Class11[int]]` in function `Class11.__new__` [bad-argument-type] """ diff --git a/conformance/results/pyrefly/constructors_call_type.toml b/conformance/results/pyrefly/constructors_call_type.toml index d5820d3e..149cd688 100644 --- a/conformance/results/pyrefly/constructors_call_type.toml +++ b/conformance/results/pyrefly/constructors_call_type.toml @@ -10,11 +10,11 @@ Line 81: Expected 1 errors Line 82: Expected 1 errors """ output = """ -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/constructors_call_type.py:30:8-10: Missing argument `x` in function `Meta1.__call__` [missing-argument] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/constructors_call_type.py:30:8-10: Missing argument `y` in function `Meta1.__call__` [missing-argument] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/constructors_call_type.py:40:8-10: Missing argument `x` in function `Class2.__new__` [missing-argument] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/constructors_call_type.py:40:8-10: Missing argument `y` in function `Class2.__new__` [missing-argument] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/constructors_call_type.py:50:8-10: Missing argument `x` in function `Class3.__init__` [missing-argument] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/constructors_call_type.py:50:8-10: Missing argument `y` in function `Class3.__init__` [missing-argument] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/constructors_call_type.py:59:9-10: Expected 0 positional arguments, got 1 in function `object.__init__` [bad-argument-count] +ERROR constructors_call_type.py:30:8-10: Missing argument `x` in function `Meta1.__call__` [missing-argument] +ERROR constructors_call_type.py:30:8-10: Missing argument `y` in function `Meta1.__call__` [missing-argument] +ERROR constructors_call_type.py:40:8-10: Missing argument `x` in function `Class2.__new__` [missing-argument] +ERROR constructors_call_type.py:40:8-10: Missing argument `y` in function `Class2.__new__` [missing-argument] +ERROR constructors_call_type.py:50:8-10: Missing argument `x` in function `Class3.__init__` [missing-argument] +ERROR constructors_call_type.py:50:8-10: Missing argument `y` in function `Class3.__init__` [missing-argument] +ERROR constructors_call_type.py:59:9-10: Expected 0 positional arguments, got 1 in function `object.__init__` [bad-argument-count] """ diff --git a/conformance/results/pyrefly/constructors_callable.toml b/conformance/results/pyrefly/constructors_callable.toml index 714ec541..42087455 100644 --- a/conformance/results/pyrefly/constructors_callable.toml +++ b/conformance/results/pyrefly/constructors_callable.toml @@ -18,18 +18,28 @@ Line 165: Unexpected errors ['assert_type(Class7[Any], Class7[str]) failed [asse Line 183: Unexpected errors ['assert_type(Class8[Any], Class8[str]) failed [assert-type]'] """ output = """ -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/constructors_callable.py:38:3-5: Missing argument `x` [missing-argument] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/constructors_callable.py:39:3-8: Missing argument `x` [missing-argument] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/constructors_callable.py:39:4-5: Unexpected keyword argument `y` [unexpected-keyword] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/constructors_callable.py:51:4-5: Expected 0 positional arguments, got 1 [bad-argument-count] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/constructors_callable.py:62:23-29: Argument `type[Class3]` is not assignable to parameter `cb` with type `(*args: Unknown, **kwargs: Unknown) -> Class3` in function `accepts_callable` [bad-argument-type] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/constructors_callable.py:79:3-5: Missing argument `x` [missing-argument] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/constructors_callable.py:80:3-8: Missing argument `x` [missing-argument] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/constructors_callable.py:80:4-5: Unexpected keyword argument `y` [unexpected-keyword] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/constructors_callable.py:127:4-5: Expected 0 positional arguments, got 1 [bad-argument-count] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/constructors_callable.py:144:8-9: Expected 0 positional arguments, got 1 [bad-argument-count] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/constructors_callable.py:164:12-32: assert_type(Class7[Any], Class7[int]) failed [assert-type] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/constructors_callable.py:165:12-33: assert_type(Class7[Any], Class7[str]) failed [assert-type] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/constructors_callable.py:165:16-18: Argument `Literal['']` is not assignable to parameter `x` with type `int` [bad-argument-type] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/constructors_callable.py:183:12-41: assert_type(Class8[Any], Class8[str]) failed [assert-type] + constructors_callable.py:36:12-16: revealed type: (x: int) -> Class1 [reveal-type] +ERROR constructors_callable.py:38:3-5: Missing argument `x` [missing-argument] +ERROR constructors_callable.py:39:3-8: Missing argument `x` [missing-argument] +ERROR constructors_callable.py:39:4-5: Unexpected keyword argument `y` [unexpected-keyword] + constructors_callable.py:49:12-16: revealed type: () -> Class2 [reveal-type] +ERROR constructors_callable.py:51:4-5: Expected 0 positional arguments, got 1 [bad-argument-count] +ERROR constructors_callable.py:62:23-29: Argument `type[Class3]` is not assignable to parameter `cb` with type `(*args: Unknown, **kwargs: Unknown) -> Class3` in function `accepts_callable` [bad-argument-type] + constructors_callable.py:63:12-16: revealed type: (*args: Unknown, **kwargs: Unknown) -> Class3 [reveal-type] + constructors_callable.py:77:12-16: revealed type: (x: int) -> int [reveal-type] +ERROR constructors_callable.py:79:3-5: Missing argument `x` [missing-argument] +ERROR constructors_callable.py:80:3-8: Missing argument `x` [missing-argument] +ERROR constructors_callable.py:80:4-5: Unexpected keyword argument `y` [unexpected-keyword] + constructors_callable.py:97:12-16: revealed type: (*args: Any, **kwargs: Any) -> NoReturn [reveal-type] + constructors_callable.py:125:12-16: revealed type: () -> Class6Proxy [reveal-type] +ERROR constructors_callable.py:127:4-5: Expected 0 positional arguments, got 1 [bad-argument-count] + constructors_callable.py:142:12-20: revealed type: () -> Any [reveal-type] +ERROR constructors_callable.py:144:8-9: Expected 0 positional arguments, got 1 [bad-argument-count] + constructors_callable.py:161:12-163:2: revealed type: (x: int) -> Class7[Unknown] [reveal-type] +ERROR constructors_callable.py:164:12-32: assert_type(Class7[Any], Class7[int]) failed [assert-type] +ERROR constructors_callable.py:165:12-33: assert_type(Class7[Any], Class7[str]) failed [assert-type] +ERROR constructors_callable.py:165:16-18: Argument `Literal['']` is not assignable to parameter `x` with type `int` [bad-argument-type] + constructors_callable.py:182:12-16: revealed type: (x: list[Unknown], y: list[Unknown]) -> Class8[Unknown] [reveal-type] +ERROR constructors_callable.py:183:12-41: assert_type(Class8[Any], Class8[str]) failed [assert-type] + constructors_callable.py:193:12-16: revealed type: (x: list[@_], y: list[@_]) -> Class9 [reveal-type] """ diff --git a/conformance/results/pyrefly/constructors_consistency.toml b/conformance/results/pyrefly/constructors_consistency.toml index cdd4d0cd..be211bd5 100644 --- a/conformance/results/pyrefly/constructors_consistency.toml +++ b/conformance/results/pyrefly/constructors_consistency.toml @@ -1,3 +1,4 @@ +conformant = "Pass" conformance_automated = "Pass" errors_diff = """ """ diff --git a/conformance/results/pyrefly/dataclasses_descriptors.toml b/conformance/results/pyrefly/dataclasses_descriptors.toml index cdd4d0cd..be211bd5 100644 --- a/conformance/results/pyrefly/dataclasses_descriptors.toml +++ b/conformance/results/pyrefly/dataclasses_descriptors.toml @@ -1,3 +1,4 @@ +conformant = "Pass" conformance_automated = "Pass" errors_diff = """ """ diff --git a/conformance/results/pyrefly/dataclasses_final.toml b/conformance/results/pyrefly/dataclasses_final.toml index e6db899d..9afd7169 100644 --- a/conformance/results/pyrefly/dataclasses_final.toml +++ b/conformance/results/pyrefly/dataclasses_final.toml @@ -7,8 +7,8 @@ errors_diff = """ Line 35: Expected 1 errors """ output = """ -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/dataclasses_final.py:27:1-17: Cannot set field `final_classvar` [read-only] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/dataclasses_final.py:36:1-21: Cannot set field `final_with_default` [read-only] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/dataclasses_final.py:37:1-19: Instance-only attribute `final_no_default` of class `D` is not visible on the class [no-access] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/dataclasses_final.py:38:1-21: Cannot set field `final_with_default` [read-only] +ERROR dataclasses_final.py:27:1-17: Cannot set field `final_classvar` [read-only] +ERROR dataclasses_final.py:36:1-21: Cannot set field `final_with_default` [read-only] +ERROR dataclasses_final.py:37:1-19: Instance-only attribute `final_no_default` of class `D` is not visible on the class [no-access] +ERROR dataclasses_final.py:38:1-21: Cannot set field `final_with_default` [read-only] """ diff --git a/conformance/results/pyrefly/dataclasses_frozen.toml b/conformance/results/pyrefly/dataclasses_frozen.toml index b5a6081d..4fd80f44 100644 --- a/conformance/results/pyrefly/dataclasses_frozen.toml +++ b/conformance/results/pyrefly/dataclasses_frozen.toml @@ -1,9 +1,10 @@ +conformant = "Pass" conformance_automated = "Pass" errors_diff = """ """ output = """ -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/dataclasses_frozen.py:16:1-6: Cannot set field `a` [read-only] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/dataclasses_frozen.py:17:1-6: Cannot set field `b` [read-only] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/dataclasses_frozen.py:23:7-10: Cannot inherit non-frozen dataclass `DC2` from frozen dataclass `DC1` [invalid-inheritance] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/dataclasses_frozen.py:33:7-10: Cannot inherit frozen dataclass `DC4` from non-frozen dataclass `DC3` [invalid-inheritance] +ERROR dataclasses_frozen.py:16:1-6: Cannot set field `a` [read-only] +ERROR dataclasses_frozen.py:17:1-6: Cannot set field `b` [read-only] +ERROR dataclasses_frozen.py:23:7-10: Cannot inherit non-frozen dataclass `DC2` from frozen dataclass `DC1` [invalid-inheritance] +ERROR dataclasses_frozen.py:33:7-10: Cannot inherit frozen dataclass `DC4` from non-frozen dataclass `DC3` [invalid-inheritance] """ diff --git a/conformance/results/pyrefly/dataclasses_hash.toml b/conformance/results/pyrefly/dataclasses_hash.toml index bd8e2906..2d674772 100644 --- a/conformance/results/pyrefly/dataclasses_hash.toml +++ b/conformance/results/pyrefly/dataclasses_hash.toml @@ -1,7 +1,8 @@ +conformant = "Pass" conformance_automated = "Pass" errors_diff = """ """ output = """ -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/dataclasses_hash.py:15:16-22: `DC1` is not assignable to `Hashable` [bad-assignment] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/dataclasses_hash.py:32:16-22: `DC3` is not assignable to `Hashable` [bad-assignment] +ERROR dataclasses_hash.py:15:16-22: `DC1` is not assignable to `Hashable` [bad-assignment] +ERROR dataclasses_hash.py:32:16-22: `DC3` is not assignable to `Hashable` [bad-assignment] """ diff --git a/conformance/results/pyrefly/dataclasses_inheritance.toml b/conformance/results/pyrefly/dataclasses_inheritance.toml index 045a8509..0b64d63a 100644 --- a/conformance/results/pyrefly/dataclasses_inheritance.toml +++ b/conformance/results/pyrefly/dataclasses_inheritance.toml @@ -1,7 +1,8 @@ +conformant = "Pass" conformance_automated = "Pass" errors_diff = """ """ output = """ -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/dataclasses_inheritance.py:62:5-6: ClassVar `DC7.x` overrides instance variable of the same name in parent class `DC6` [bad-override] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/dataclasses_inheritance.py:66:5-6: Instance variable `DC7.y` overrides ClassVar of the same name in parent class `DC6` [bad-override] +ERROR dataclasses_inheritance.py:62:5-6: ClassVar `DC7.x` overrides instance variable of the same name in parent class `DC6` [bad-override] +ERROR dataclasses_inheritance.py:66:5-6: Instance variable `DC7.y` overrides ClassVar of the same name in parent class `DC6` [bad-override] """ diff --git a/conformance/results/pyrefly/dataclasses_kwonly.toml b/conformance/results/pyrefly/dataclasses_kwonly.toml index c4d80ab2..aebe69eb 100644 --- a/conformance/results/pyrefly/dataclasses_kwonly.toml +++ b/conformance/results/pyrefly/dataclasses_kwonly.toml @@ -1,8 +1,9 @@ +conformant = "Pass" conformance_automated = "Pass" errors_diff = """ """ output = """ -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/dataclasses_kwonly.py:23:11-12: Expected 1 positional argument, got 2 in function `DC1.__init__` [bad-argument-count] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/dataclasses_kwonly.py:38:11-12: Expected 1 positional argument, got 2 in function `DC2.__init__` [bad-argument-count] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/dataclasses_kwonly.py:53:11-12: Expected 1 positional argument, got 2 in function `DC3.__init__` [bad-argument-count] +ERROR dataclasses_kwonly.py:23:11-12: Expected 1 positional argument, got 2 in function `DC1.__init__` [bad-argument-count] +ERROR dataclasses_kwonly.py:38:11-12: Expected 1 positional argument, got 2 in function `DC2.__init__` [bad-argument-count] +ERROR dataclasses_kwonly.py:53:11-12: Expected 1 positional argument, got 2 in function `DC3.__init__` [bad-argument-count] """ diff --git a/conformance/results/pyrefly/dataclasses_match_args.toml b/conformance/results/pyrefly/dataclasses_match_args.toml index 1d8d664f..16221354 100644 --- a/conformance/results/pyrefly/dataclasses_match_args.toml +++ b/conformance/results/pyrefly/dataclasses_match_args.toml @@ -1,6 +1,7 @@ +conformant = "Pass" conformance_automated = "Pass" errors_diff = """ """ output = """ -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/dataclasses_match_args.py:42:1-19: Class `DC4` has no class attribute `__match_args__` [missing-attribute] +ERROR dataclasses_match_args.py:42:1-19: Class `DC4` has no class attribute `__match_args__` [missing-attribute] """ diff --git a/conformance/results/pyrefly/dataclasses_order.toml b/conformance/results/pyrefly/dataclasses_order.toml index 589b66f4..65b34aec 100644 --- a/conformance/results/pyrefly/dataclasses_order.toml +++ b/conformance/results/pyrefly/dataclasses_order.toml @@ -1,6 +1,7 @@ +conformant = "Pass" conformance_automated = "Pass" errors_diff = """ """ output = """ -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/dataclasses_order.py:50:4-17: `<` is not supported between `DC1` and `DC2` [unsupported-operation] +ERROR dataclasses_order.py:50:4-17: `<` is not supported between `DC1` and `DC2` [unsupported-operation] """ diff --git a/conformance/results/pyrefly/dataclasses_postinit.toml b/conformance/results/pyrefly/dataclasses_postinit.toml index dbef33c7..7691703f 100644 --- a/conformance/results/pyrefly/dataclasses_postinit.toml +++ b/conformance/results/pyrefly/dataclasses_postinit.toml @@ -1,9 +1,10 @@ +conformant = "Pass" conformance_automated = "Pass" errors_diff = """ """ output = """ -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/dataclasses_postinit.py:19:9-22: `__post_init__` type `BoundMethod[DC1, (self: Self@DC1, x: int, y: int) -> None]` is not assignable to expected type `(x: int, y: str) -> object` generated from the dataclass's `InitVar` fields [bad-function-definition] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/dataclasses_postinit.py:28:7-12: Object of class `DC1` has no attribute `x` [missing-attribute] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/dataclasses_postinit.py:29:7-12: Object of class `DC1` has no attribute `y` [missing-attribute] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/dataclasses_postinit.py:36:9-22: `__post_init__` type `BoundMethod[DC2, (self: Self@DC2, x: int) -> None]` is not assignable to expected type `(x: int, y: str) -> object` generated from the dataclass's `InitVar` fields [bad-function-definition] +ERROR dataclasses_postinit.py:19:9-22: `__post_init__` type `BoundMethod[DC1, (self: Self@DC1, x: int, y: int) -> None]` is not assignable to expected type `(x: int, y: str) -> object` generated from the dataclass's `InitVar` fields [bad-function-definition] +ERROR dataclasses_postinit.py:28:7-12: Object of class `DC1` has no attribute `x` [missing-attribute] +ERROR dataclasses_postinit.py:29:7-12: Object of class `DC1` has no attribute `y` [missing-attribute] +ERROR dataclasses_postinit.py:36:9-22: `__post_init__` type `BoundMethod[DC2, (self: Self@DC2, x: int) -> None]` is not assignable to expected type `(x: int, y: str) -> object` generated from the dataclass's `InitVar` fields [bad-function-definition] """ diff --git a/conformance/results/pyrefly/dataclasses_slots.toml b/conformance/results/pyrefly/dataclasses_slots.toml index b7f8c6a9..5f4adca8 100644 --- a/conformance/results/pyrefly/dataclasses_slots.toml +++ b/conformance/results/pyrefly/dataclasses_slots.toml @@ -8,7 +8,7 @@ Line 25: Expected 1 errors Line 38: Expected 1 errors """ output = """ -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/dataclasses_slots.py:11:7-10: Cannot specify both `slots=True` and `__slots__` [bad-class-definition] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/dataclasses_slots.py:66:1-14: Class `DC6` has no class attribute `__slots__` [missing-attribute] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/dataclasses_slots.py:69:1-17: Object of class `DC6` has no attribute `__slots__` [missing-attribute] +ERROR dataclasses_slots.py:11:7-10: Cannot specify both `slots=True` and `__slots__` [bad-class-definition] +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] """ diff --git a/conformance/results/pyrefly/dataclasses_transform_class.toml b/conformance/results/pyrefly/dataclasses_transform_class.toml index 73f281cd..31fc9270 100644 --- a/conformance/results/pyrefly/dataclasses_transform_class.toml +++ b/conformance/results/pyrefly/dataclasses_transform_class.toml @@ -1,13 +1,14 @@ +conformant = "Pass" conformance_automated = "Pass" errors_diff = """ """ output = """ -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/dataclasses_transform_class.py:51:7-24: Cannot inherit non-frozen dataclass `Customer1Subclass` from frozen dataclass `Customer1` [invalid-inheritance] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/dataclasses_transform_class.py:63:1-8: Cannot set field `id` [read-only] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/dataclasses_transform_class.py:66:18-19: Expected argument `id` to be passed by name in function `Customer1.__init__` [unexpected-positional-argument] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/dataclasses_transform_class.py:66:21-26: Expected argument `name` to be passed by name in function `Customer1.__init__` [unexpected-positional-argument] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/dataclasses_transform_class.py:72:6-17: `<` is not supported between `Customer1` and `Customer1` [unsupported-operation] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/dataclasses_transform_class.py:82:18-19: Expected argument `id` to be passed by name in function `Customer2.__init__` [unexpected-positional-argument] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/dataclasses_transform_class.py:82:18-19: Expected 0 positional arguments, got 2 in function `Customer2.__init__` [bad-argument-count] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/dataclasses_transform_class.py:122:1-8: Cannot set field `id` [read-only] +ERROR dataclasses_transform_class.py:51:7-24: Cannot inherit non-frozen dataclass `Customer1Subclass` from frozen dataclass `Customer1` [invalid-inheritance] +ERROR dataclasses_transform_class.py:63:1-8: Cannot set field `id` [read-only] +ERROR dataclasses_transform_class.py:66:18-19: Expected argument `id` to be passed by name in function `Customer1.__init__` [unexpected-positional-argument] +ERROR dataclasses_transform_class.py:66:21-26: Expected argument `name` to be passed by name in function `Customer1.__init__` [unexpected-positional-argument] +ERROR dataclasses_transform_class.py:72:6-17: `<` is not supported between `Customer1` and `Customer1` [unsupported-operation] +ERROR dataclasses_transform_class.py:82:18-19: Expected argument `id` to be passed by name in function `Customer2.__init__` [unexpected-positional-argument] +ERROR dataclasses_transform_class.py:82:18-19: Expected 0 positional arguments, got 2 in function `Customer2.__init__` [bad-argument-count] +ERROR dataclasses_transform_class.py:122:1-8: Cannot set field `id` [read-only] """ diff --git a/conformance/results/pyrefly/dataclasses_transform_converter.toml b/conformance/results/pyrefly/dataclasses_transform_converter.toml index ce39fc49..c3b990de 100644 --- a/conformance/results/pyrefly/dataclasses_transform_converter.toml +++ b/conformance/results/pyrefly/dataclasses_transform_converter.toml @@ -1,16 +1,17 @@ +conformant = "Pass" conformance_automated = "Pass" errors_diff = """ """ output = """ -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/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 /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/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 /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/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 /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/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 /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/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 /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/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 /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/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] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/dataclasses_transform_converter.py:118:14-15: `Literal[1]` is not assignable to attribute `field0` with type `str` [bad-assignment] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/dataclasses_transform_converter.py:119:14-15: `Literal[1]` is not assignable to attribute `field3` with type `bytes | str` [bad-assignment] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/dataclasses_transform_converter.py:130:67-68: Argument `Literal[1]` is not assignable to parameter `default` with type `str | None` in function `model_field` [bad-argument-type] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/dataclasses_transform_converter.py:133:75-78: Argument `type[int]` is not assignable to parameter `default_factory` with type `(() -> str) | None` 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 `(@_) -> 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 `(@_) -> 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 `(@_) -> @_` 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] +ERROR dataclasses_transform_converter.py:118:14-15: `Literal[1]` is not assignable to attribute `field0` with type `str` [bad-assignment] +ERROR dataclasses_transform_converter.py:119:14-15: `Literal[1]` is not assignable to attribute `field3` with type `bytes | str` [bad-assignment] +ERROR dataclasses_transform_converter.py:130:67-68: Argument `Literal[1]` is not assignable to parameter `default` with type `str | None` in function `model_field` [bad-argument-type] +ERROR dataclasses_transform_converter.py:133:75-78: Argument `type[int]` is not assignable to parameter `default_factory` with type `(() -> str) | None` in function `model_field` [bad-argument-type] """ diff --git a/conformance/results/pyrefly/dataclasses_transform_field.toml b/conformance/results/pyrefly/dataclasses_transform_field.toml index bbfec45a..df3d0950 100644 --- a/conformance/results/pyrefly/dataclasses_transform_field.toml +++ b/conformance/results/pyrefly/dataclasses_transform_field.toml @@ -1,7 +1,8 @@ +conformant = "Pass" conformance_automated = "Pass" errors_diff = """ """ output = """ -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/dataclasses_transform_field.py:64:16-18: Unexpected keyword argument `id` in function `CustomerModel1.__init__` [unexpected-keyword] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/dataclasses_transform_field.py:75:16-17: Expected argument `name` to be passed by name in function `CustomerModel2.__init__` [unexpected-positional-argument] +ERROR dataclasses_transform_field.py:64:16-18: Unexpected keyword argument `id` in function `CustomerModel1.__init__` [unexpected-keyword] +ERROR dataclasses_transform_field.py:75:16-17: Expected argument `name` to be passed by name in function `CustomerModel2.__init__` [unexpected-positional-argument] """ diff --git a/conformance/results/pyrefly/dataclasses_transform_func.toml b/conformance/results/pyrefly/dataclasses_transform_func.toml index a58ceeab..1d8c11fc 100644 --- a/conformance/results/pyrefly/dataclasses_transform_func.toml +++ b/conformance/results/pyrefly/dataclasses_transform_func.toml @@ -1,12 +1,13 @@ +conformant = "Pass" conformance_automated = "Pass" errors_diff = """ """ output = """ -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/dataclasses_transform_func.py:56:13-14: `Literal[3]` is not assignable to attribute `name` with type `str` [bad-assignment] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/dataclasses_transform_func.py:60:6-17: `<` is not supported between `Customer1` and `Customer1` [unsupported-operation] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/dataclasses_transform_func.py:64:36-42: Unexpected keyword argument `salary` in function `Customer1.__init__` [unexpected-keyword] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/dataclasses_transform_func.py:70:18-19: Expected argument `id` to be passed by name in function `Customer2.__init__` [unexpected-positional-argument] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/dataclasses_transform_func.py:70:21-27: Expected argument `name` to be passed by name in function `Customer2.__init__` [unexpected-positional-argument] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/dataclasses_transform_func.py:89:7-24: Cannot inherit non-frozen dataclass `Customer3Subclass` from frozen dataclass `Customer3` [invalid-inheritance] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/dataclasses_transform_func.py:96:1-8: Cannot set field `id` [read-only] +ERROR dataclasses_transform_func.py:56:13-14: `Literal[3]` is not assignable to attribute `name` with type `str` [bad-assignment] +ERROR dataclasses_transform_func.py:60:6-17: `<` is not supported between `Customer1` and `Customer1` [unsupported-operation] +ERROR dataclasses_transform_func.py:64:36-42: Unexpected keyword argument `salary` in function `Customer1.__init__` [unexpected-keyword] +ERROR dataclasses_transform_func.py:70:18-19: Expected argument `id` to be passed by name in function `Customer2.__init__` [unexpected-positional-argument] +ERROR dataclasses_transform_func.py:70:21-27: Expected argument `name` to be passed by name in function `Customer2.__init__` [unexpected-positional-argument] +ERROR dataclasses_transform_func.py:89:7-24: Cannot inherit non-frozen dataclass `Customer3Subclass` from frozen dataclass `Customer3` [invalid-inheritance] +ERROR dataclasses_transform_func.py:96:1-8: Cannot set field `id` [read-only] """ diff --git a/conformance/results/pyrefly/dataclasses_transform_meta.toml b/conformance/results/pyrefly/dataclasses_transform_meta.toml index 869e74a7..8af862f4 100644 --- a/conformance/results/pyrefly/dataclasses_transform_meta.toml +++ b/conformance/results/pyrefly/dataclasses_transform_meta.toml @@ -1,13 +1,14 @@ +conformant = "Pass" conformance_automated = "Pass" errors_diff = """ """ output = """ -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/dataclasses_transform_meta.py:51:7-24: Cannot inherit non-frozen dataclass `Customer1Subclass` from frozen dataclass `Customer1` [invalid-inheritance] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/dataclasses_transform_meta.py:63:1-8: Cannot set field `id` [read-only] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/dataclasses_transform_meta.py:66:18-19: Expected argument `id` to be passed by name in function `Customer1.__init__` [unexpected-positional-argument] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/dataclasses_transform_meta.py:66:21-26: Expected argument `name` to be passed by name in function `Customer1.__init__` [unexpected-positional-argument] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/dataclasses_transform_meta.py:73:6-17: `<` is not supported between `Customer1` and `Customer1` [unsupported-operation] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/dataclasses_transform_meta.py:83:18-19: Expected argument `id` to be passed by name in function `Customer2.__init__` [unexpected-positional-argument] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/dataclasses_transform_meta.py:83:18-19: Expected 0 positional arguments, got 2 in function `Customer2.__init__` [bad-argument-count] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/dataclasses_transform_meta.py:103:1-8: Cannot set field `id` [read-only] +ERROR dataclasses_transform_meta.py:51:7-24: Cannot inherit non-frozen dataclass `Customer1Subclass` from frozen dataclass `Customer1` [invalid-inheritance] +ERROR dataclasses_transform_meta.py:63:1-8: Cannot set field `id` [read-only] +ERROR dataclasses_transform_meta.py:66:18-19: Expected argument `id` to be passed by name in function `Customer1.__init__` [unexpected-positional-argument] +ERROR dataclasses_transform_meta.py:66:21-26: Expected argument `name` to be passed by name in function `Customer1.__init__` [unexpected-positional-argument] +ERROR dataclasses_transform_meta.py:73:6-17: `<` is not supported between `Customer1` and `Customer1` [unsupported-operation] +ERROR dataclasses_transform_meta.py:83:18-19: Expected argument `id` to be passed by name in function `Customer2.__init__` [unexpected-positional-argument] +ERROR dataclasses_transform_meta.py:83:18-19: Expected 0 positional arguments, got 2 in function `Customer2.__init__` [bad-argument-count] +ERROR dataclasses_transform_meta.py:103:1-8: Cannot set field `id` [read-only] """ diff --git a/conformance/results/pyrefly/dataclasses_usage.toml b/conformance/results/pyrefly/dataclasses_usage.toml index 927f4a09..c8156fc6 100644 --- a/conformance/results/pyrefly/dataclasses_usage.toml +++ b/conformance/results/pyrefly/dataclasses_usage.toml @@ -1,16 +1,17 @@ +conformant = "Pass" conformance_automated = "Pass" errors_diff = """ """ output = """ -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/dataclasses_usage.py:50:19-27: Missing argument `unit_price` in function `InventoryItem.__init__` [missing-argument] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/dataclasses_usage.py:51:28-35: Argument `Literal['price']` is not assignable to parameter `unit_price` with type `float` in function `InventoryItem.__init__` [bad-argument-type] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/dataclasses_usage.py:52:36-37: Expected 3 positional arguments, got 4 in function `InventoryItem.__init__` [bad-argument-count] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/dataclasses_usage.py:61:5-6: Dataclass field `b` without a default may not follow dataclass field with a default [bad-class-definition] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/dataclasses_usage.py:67:5-6: Dataclass field `b` without a default may not follow dataclass field with a default [bad-class-definition] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/dataclasses_usage.py:73:5-6: Dataclass field `b` without a default may not follow dataclass field with a default [bad-class-definition] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/dataclasses_usage.py:83:13-14: Expected 1 positional argument, got 2 in function `DC4.__init__` [bad-argument-count] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/dataclasses_usage.py:88:14-40: `str` is not assignable to `int` [bad-assignment] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/dataclasses_usage.py:127:8-9: Expected 1 positional argument, got 2 in function `DC7.__init__` [bad-argument-count] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/dataclasses_usage.py:130:4-7: Missing argument `y` in function `DC8.__init__` [missing-argument] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/dataclasses_usage.py:179:6-7: Expected 0 positional arguments, got 1 in function `object.__init__` [bad-argument-count] +ERROR dataclasses_usage.py:50:19-27: Missing argument `unit_price` in function `InventoryItem.__init__` [missing-argument] +ERROR dataclasses_usage.py:51:28-35: Argument `Literal['price']` is not assignable to parameter `unit_price` with type `float` in function `InventoryItem.__init__` [bad-argument-type] +ERROR dataclasses_usage.py:52:36-37: Expected 3 positional arguments, got 4 in function `InventoryItem.__init__` [bad-argument-count] +ERROR dataclasses_usage.py:61:5-6: Dataclass field `b` without a default may not follow dataclass field with a default [bad-class-definition] +ERROR dataclasses_usage.py:67:5-6: Dataclass field `b` without a default may not follow dataclass field with a default [bad-class-definition] +ERROR dataclasses_usage.py:73:5-6: Dataclass field `b` without a default may not follow dataclass field with a default [bad-class-definition] +ERROR dataclasses_usage.py:83:13-14: Expected 1 positional argument, got 2 in function `DC4.__init__` [bad-argument-count] +ERROR dataclasses_usage.py:88:14-40: `str` is not assignable to `int` [bad-assignment] +ERROR dataclasses_usage.py:127:8-9: Expected 1 positional argument, got 2 in function `DC7.__init__` [bad-argument-count] +ERROR dataclasses_usage.py:130:4-7: Missing argument `y` in function `DC8.__init__` [missing-argument] +ERROR dataclasses_usage.py:179:6-7: Expected 0 positional arguments, got 1 in function `object.__init__` [bad-argument-count] """ diff --git a/conformance/results/pyrefly/directives_assert_type.toml b/conformance/results/pyrefly/directives_assert_type.toml index 2f895891..35e07db7 100644 --- a/conformance/results/pyrefly/directives_assert_type.toml +++ b/conformance/results/pyrefly/directives_assert_type.toml @@ -1,11 +1,12 @@ +conformant = "Pass" conformance_automated = "Pass" errors_diff = """ """ output = """ -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/directives_assert_type.py:27:16-24: assert_type(int | str, int) failed [assert-type] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/directives_assert_type.py:28:16-24: assert_type(Any, int) failed [assert-type] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/directives_assert_type.py:29:16-24: assert_type(Literal[4], int) failed [assert-type] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/directives_assert_type.py:31:16-18: assert_type needs 2 positional arguments, got 0 [bad-argument-count] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/directives_assert_type.py:32:16-25: assert_type(Literal[''], int) failed [assert-type] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/directives_assert_type.py:33:16-33: assert_type needs 2 positional arguments, got 3 [bad-argument-count] +ERROR directives_assert_type.py:27:16-24: assert_type(int | str, int) failed [assert-type] +ERROR directives_assert_type.py:28:16-24: assert_type(Any, int) failed [assert-type] +ERROR directives_assert_type.py:29:16-24: assert_type(Literal[4], int) failed [assert-type] +ERROR directives_assert_type.py:31:16-18: assert_type needs 2 positional arguments, got 0 [bad-argument-count] +ERROR directives_assert_type.py:32:16-25: assert_type(Literal[''], int) failed [assert-type] +ERROR directives_assert_type.py:33:16-33: assert_type needs 2 positional arguments, got 3 [bad-argument-count] """ diff --git a/conformance/results/pyrefly/directives_cast.toml b/conformance/results/pyrefly/directives_cast.toml index 15b1539c..e4e745ae 100644 --- a/conformance/results/pyrefly/directives_cast.toml +++ b/conformance/results/pyrefly/directives_cast.toml @@ -1,9 +1,10 @@ +conformant = "Pass" conformance_automated = "Pass" errors_diff = """ """ output = """ -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/directives_cast.py:15:12-14: `typing.cast` missing required argument `typ` [missing-argument] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/directives_cast.py:15:12-14: `typing.cast` missing required argument `val` [missing-argument] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/directives_cast.py:16:12-19: First argument to `typing.cast` must be a type [bad-argument-type] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/directives_cast.py:17:12-25: `typing.cast` expected 2 arguments, got 3 [bad-argument-count] +ERROR directives_cast.py:15:12-14: `typing.cast` missing required argument `typ` [missing-argument] +ERROR directives_cast.py:15:12-14: `typing.cast` missing required argument `val` [missing-argument] +ERROR directives_cast.py:16:12-19: First argument to `typing.cast` must be a type [bad-argument-type] +ERROR directives_cast.py:17:12-25: `typing.cast` expected 2 arguments, got 3 [bad-argument-count] """ diff --git a/conformance/results/pyrefly/directives_deprecated.toml b/conformance/results/pyrefly/directives_deprecated.toml index 2b371826..74a72654 100644 --- a/conformance/results/pyrefly/directives_deprecated.toml +++ b/conformance/results/pyrefly/directives_deprecated.toml @@ -1,7 +1,6 @@ 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 @@ -15,4 +14,5 @@ Line 69: Expected 1 errors Line 98: Expected 1 errors """ output = """ + directives_deprecated.py:18:44-47: `Ham` is deprecated [deprecated] """ diff --git a/conformance/results/pyrefly/directives_no_type_check.toml b/conformance/results/pyrefly/directives_no_type_check.toml index a7d97bfb..e3669041 100644 --- a/conformance/results/pyrefly/directives_no_type_check.toml +++ b/conformance/results/pyrefly/directives_no_type_check.toml @@ -1,10 +1,11 @@ +conformant = "Pass" conformance_automated = "Pass" errors_diff = """ """ output = """ -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/directives_no_type_check.py:15:14-16: `Literal['']` is not assignable to `int` [bad-assignment] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/directives_no_type_check.py:29:7-17: Argument `Literal[b'invalid']` is not assignable to parameter `a` with type `int` in function `func1` [bad-argument-type] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/directives_no_type_check.py:29:19-31: Argument `Literal[b'arguments']` is not assignable to parameter `b` with type `str` in function `func1` [bad-argument-type] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/directives_no_type_check.py:32:6-8: Missing argument `a` in function `func1` [missing-argument] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/directives_no_type_check.py:32:6-8: Missing argument `b` in function `func1` [missing-argument] +ERROR directives_no_type_check.py:15:14-16: `Literal['']` is not assignable to `int` [bad-assignment] +ERROR directives_no_type_check.py:29:7-17: Argument `Literal[b'invalid']` is not assignable to parameter `a` with type `int` in function `func1` [bad-argument-type] +ERROR directives_no_type_check.py:29:19-31: Argument `Literal[b'arguments']` is not assignable to parameter `b` with type `str` in function `func1` [bad-argument-type] +ERROR directives_no_type_check.py:32:6-8: Missing argument `a` in function `func1` [missing-argument] +ERROR directives_no_type_check.py:32:6-8: Missing argument `b` in function `func1` [missing-argument] """ diff --git a/conformance/results/pyrefly/directives_reveal_type.toml b/conformance/results/pyrefly/directives_reveal_type.toml index 3ae85a4f..2257de40 100644 --- a/conformance/results/pyrefly/directives_reveal_type.toml +++ b/conformance/results/pyrefly/directives_reveal_type.toml @@ -1,7 +1,12 @@ +conformant = "Pass" conformance_automated = "Pass" errors_diff = """ """ output = """ -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/directives_reveal_type.py:19:16-18: reveal_type needs 1 positional argument, got 0 [bad-argument-count] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/directives_reveal_type.py:20:16-22: reveal_type needs 1 positional argument, got 2 [bad-argument-count] + directives_reveal_type.py:14:16-19: revealed type: int | str [reveal-type] + directives_reveal_type.py:15:16-19: revealed type: list[int] [reveal-type] + directives_reveal_type.py:16:16-19: revealed type: Any [reveal-type] + directives_reveal_type.py:17:16-19: revealed type: ForwardReference [reveal-type] +ERROR directives_reveal_type.py:19:16-18: reveal_type needs 1 positional argument, got 0 [bad-argument-count] +ERROR directives_reveal_type.py:20:16-22: reveal_type needs 1 positional argument, got 2 [bad-argument-count] """ diff --git a/conformance/results/pyrefly/directives_type_checking.toml b/conformance/results/pyrefly/directives_type_checking.toml index cdd4d0cd..be211bd5 100644 --- a/conformance/results/pyrefly/directives_type_checking.toml +++ b/conformance/results/pyrefly/directives_type_checking.toml @@ -1,3 +1,4 @@ +conformant = "Pass" conformance_automated = "Pass" errors_diff = """ """ diff --git a/conformance/results/pyrefly/directives_type_ignore.toml b/conformance/results/pyrefly/directives_type_ignore.toml index cdd4d0cd..be211bd5 100644 --- a/conformance/results/pyrefly/directives_type_ignore.toml +++ b/conformance/results/pyrefly/directives_type_ignore.toml @@ -1,3 +1,4 @@ +conformant = "Pass" conformance_automated = "Pass" errors_diff = """ """ diff --git a/conformance/results/pyrefly/directives_type_ignore_file1.toml b/conformance/results/pyrefly/directives_type_ignore_file1.toml index cdd4d0cd..be211bd5 100644 --- a/conformance/results/pyrefly/directives_type_ignore_file1.toml +++ b/conformance/results/pyrefly/directives_type_ignore_file1.toml @@ -1,3 +1,4 @@ +conformant = "Pass" conformance_automated = "Pass" errors_diff = """ """ diff --git a/conformance/results/pyrefly/directives_type_ignore_file2.toml b/conformance/results/pyrefly/directives_type_ignore_file2.toml index 294d88e9..ae2a41fd 100644 --- a/conformance/results/pyrefly/directives_type_ignore_file2.toml +++ b/conformance/results/pyrefly/directives_type_ignore_file2.toml @@ -1,6 +1,7 @@ +conformant = "Pass" conformance_automated = "Pass" errors_diff = """ """ output = """ -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/directives_type_ignore_file2.py:14:10-12: `Literal['']` is not assignable to `int` [bad-assignment] +ERROR directives_type_ignore_file2.py:14:10-12: `Literal['']` is not assignable to `int` [bad-assignment] """ diff --git a/conformance/results/pyrefly/directives_version_platform.toml b/conformance/results/pyrefly/directives_version_platform.toml index 6d176aaa..9ef3c26b 100644 --- a/conformance/results/pyrefly/directives_version_platform.toml +++ b/conformance/results/pyrefly/directives_version_platform.toml @@ -1,7 +1,8 @@ +conformant = "Pass" conformance_automated = "Pass" errors_diff = """ """ output = """ -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/directives_version_platform.py:40:17-19: `Literal['']` is not assignable to `int` [bad-assignment] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/directives_version_platform.py:45:17-19: `Literal['']` is not assignable to `int` [bad-assignment] +ERROR directives_version_platform.py:40:17-19: `Literal['']` is not assignable to `int` [bad-assignment] +ERROR directives_version_platform.py:45:17-19: `Literal['']` is not assignable to `int` [bad-assignment] """ diff --git a/conformance/results/pyrefly/enums_behaviors.toml b/conformance/results/pyrefly/enums_behaviors.toml index 70e74c9d..40b63a7e 100644 --- a/conformance/results/pyrefly/enums_behaviors.toml +++ b/conformance/results/pyrefly/enums_behaviors.toml @@ -7,8 +7,8 @@ errors_diff = """ Line 20: Unexpected errors ['assert_type(Any, Color) failed [assert-type]'] """ output = """ -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/enums_behaviors.py:20:16-30: assert_type(Any, Color) failed [assert-type] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/enums_behaviors.py:27:12-33: assert_type(Literal[Color.RED], Color) failed [assert-type] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/enums_behaviors.py:32:12-43: assert_type(Color, Literal[Color.BLUE]) failed [assert-type] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/enums_behaviors.py:44:21-26: Cannot extend final class `Shape` [invalid-inheritance] +ERROR enums_behaviors.py:20:16-30: assert_type(Any, Color) failed [assert-type] +ERROR enums_behaviors.py:27:12-33: assert_type(Literal[Color.RED], Color) failed [assert-type] +ERROR enums_behaviors.py:32:12-43: assert_type(Color, Literal[Color.BLUE]) failed [assert-type] +ERROR enums_behaviors.py:44:21-26: Cannot extend final class `Shape` [invalid-inheritance] """ diff --git a/conformance/results/pyrefly/enums_definition.toml b/conformance/results/pyrefly/enums_definition.toml index cdd4d0cd..be211bd5 100644 --- a/conformance/results/pyrefly/enums_definition.toml +++ b/conformance/results/pyrefly/enums_definition.toml @@ -1,3 +1,4 @@ +conformant = "Pass" conformance_automated = "Pass" errors_diff = """ """ diff --git a/conformance/results/pyrefly/enums_expansion.toml b/conformance/results/pyrefly/enums_expansion.toml index a05e6435..bbf9ce7c 100644 --- a/conformance/results/pyrefly/enums_expansion.toml +++ b/conformance/results/pyrefly/enums_expansion.toml @@ -1,6 +1,7 @@ +conformant = "Pass" conformance_automated = "Pass" errors_diff = """ """ output = """ -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/enums_expansion.py:53:20-51: assert_type(CustomFlags, Literal[CustomFlags.FLAG3]) failed [assert-type] +ERROR enums_expansion.py:53:20-51: assert_type(CustomFlags, Literal[CustomFlags.FLAG3]) failed [assert-type] """ diff --git a/conformance/results/pyrefly/enums_member_names.toml b/conformance/results/pyrefly/enums_member_names.toml index 9650f2d3..f0f464fe 100644 --- a/conformance/results/pyrefly/enums_member_names.toml +++ b/conformance/results/pyrefly/enums_member_names.toml @@ -1,6 +1,7 @@ +conformant = "Pass" conformance_automated = "Pass" errors_diff = """ """ output = """ -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/enums_member_names.py:30:16-65: assert_type(str, Literal['BLUE', 'GREEN', 'RED']) failed [assert-type] +ERROR enums_member_names.py:30:16-65: assert_type(str, Literal['BLUE', 'GREEN', 'RED']) failed [assert-type] """ diff --git a/conformance/results/pyrefly/enums_member_values.toml b/conformance/results/pyrefly/enums_member_values.toml index ef822062..103ac005 100644 --- a/conformance/results/pyrefly/enums_member_values.toml +++ b/conformance/results/pyrefly/enums_member_values.toml @@ -1,14 +1,15 @@ +conformant = "Pass" conformance_automated = "Pass" errors_diff = """ """ output = """ -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/enums_member_values.py:21:12-43: assert_type(int, Literal[1]) failed [assert-type] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/enums_member_values.py:22:12-41: assert_type(int, Literal[1]) failed [assert-type] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/enums_member_values.py:26:16-50: assert_type(int, Literal[1, 3]) failed [assert-type] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/enums_member_values.py:30:16-51: assert_type(int, Literal[1, 2, 3]) failed [assert-type] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/enums_member_values.py:54:12-46: assert_type(tuple[Literal[1], float, float], Literal[1]) failed [assert-type] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/enums_member_values.py:68:12-42: assert_type(auto, Literal[1]) failed [assert-type] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/enums_member_values.py:78:5-10: Enum member `GREEN` has type `str`, must match the `_value_` attribute annotation of `int` [bad-assignment] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/enums_member_values.py:85:24-29: `int` is not assignable to attribute `_value_` with type `str` [bad-assignment] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/enums_member_values.py:96:12-41: assert_type(Ellipsis, int) failed [assert-type] +ERROR enums_member_values.py:21:12-43: assert_type(int, Literal[1]) failed [assert-type] +ERROR enums_member_values.py:22:12-41: assert_type(int, Literal[1]) failed [assert-type] +ERROR enums_member_values.py:26:16-50: assert_type(int, Literal[1, 3]) failed [assert-type] +ERROR enums_member_values.py:30:16-51: assert_type(int, Literal[1, 2, 3]) failed [assert-type] +ERROR enums_member_values.py:54:12-46: assert_type(tuple[Literal[1], float, float], Literal[1]) failed [assert-type] +ERROR enums_member_values.py:68:12-42: assert_type(auto, Literal[1]) failed [assert-type] +ERROR enums_member_values.py:78:5-10: Enum member `GREEN` has type `str`, must match the `_value_` attribute annotation of `int` [bad-assignment] +ERROR enums_member_values.py:85:24-29: `int` is not assignable to attribute `_value_` with type `str` [bad-assignment] +ERROR enums_member_values.py:96:12-41: assert_type(Ellipsis, int) failed [assert-type] """ diff --git a/conformance/results/pyrefly/enums_members.toml b/conformance/results/pyrefly/enums_members.toml index 9e9397d0..5e14c87e 100644 --- a/conformance/results/pyrefly/enums_members.toml +++ b/conformance/results/pyrefly/enums_members.toml @@ -9,24 +9,25 @@ Line 28: Unexpected errors ['assert_type(Any, str) failed [assert-type]', 'Insta Line 100: Unexpected errors ['assert_type(Literal[TrafficLight.AMBER], Literal[TrafficLight.YELLOW]) failed [assert-type]'] """ output = """ -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/enums_members.py:27:12-28: assert_type(Any, str) failed [assert-type] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/enums_members.py:27:13-22: Instance-only attribute `genus` of class `Pet` is not visible on the class [missing-attribute] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/enums_members.py:28:12-30: assert_type(Any, str) failed [assert-type] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/enums_members.py:28:13-24: Instance-only attribute `species` of class `Pet` is not visible on the class [missing-attribute] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/enums_members.py:50:5-8: Enum member `DOG` may not be annotated directly. Instead, annotate the `_value_` attribute. [invalid-annotation] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/enums_members.py:82:12-53: assert_type((x: Any) -> str, Any) failed [assert-type] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/enums_members.py:82:37-51: `Pet4.converter` is not a valid enum member [invalid-literal] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/enums_members.py:83:12-53: assert_type((x: int) -> int, Any) failed [assert-type] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/enums_members.py:83:37-51: `Pet4.transform` is not a valid enum member [invalid-literal] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/enums_members.py:84:12-49: assert_type((self: Self) -> str, Any) failed [assert-type] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/enums_members.py:84:35-47: `Pet4.species` is not a valid enum member [invalid-literal] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/enums_members.py:85:12-45: assert_type((self: Self) -> None, Any) failed [assert-type] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/enums_members.py:85:33-43: `Pet4.speak` is not a valid enum member [invalid-literal] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/enums_members.py:100:12-62: assert_type(Literal[TrafficLight.AMBER], Literal[TrafficLight.YELLOW]) failed [assert-type] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/enums_members.py:116:12-43: assert_type(nonmember[int], Any) failed [assert-type] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/enums_members.py:116:32-41: `Example.b` is not a valid enum member [invalid-literal] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/enums_members.py:129:20-57: assert_type(int, Any) failed [assert-type] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/enums_members.py:129:43-55: `Example2.__B` is not a valid enum member [invalid-literal] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/enums_members.py:146:12-27: assert_type(Literal[Pet5.DOG], int) failed [assert-type] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/enums_members.py:147:12-28: assert_type(Literal[Pet5.FISH], int) failed [assert-type] +ERROR enums_members.py:27:12-28: assert_type(Any, str) failed [assert-type] +ERROR enums_members.py:27:13-22: Instance-only attribute `genus` of class `Pet` is not visible on the class [missing-attribute] +ERROR enums_members.py:28:12-30: assert_type(Any, str) failed [assert-type] +ERROR enums_members.py:28:13-24: Instance-only attribute `species` of class `Pet` is not visible on the class [missing-attribute] +ERROR enums_members.py:50:5-8: Enum member `DOG` may not be annotated directly. Instead, annotate the `_value_` attribute. [invalid-annotation] +ERROR enums_members.py:82:12-53: assert_type((x: Any) -> str, Any) failed [assert-type] +ERROR enums_members.py:82:37-51: `Pet4.converter` is not a valid enum member [invalid-literal] +ERROR enums_members.py:83:12-53: assert_type((x: int) -> int, Any) failed [assert-type] +ERROR enums_members.py:83:37-51: `Pet4.transform` is not a valid enum member [invalid-literal] +ERROR enums_members.py:84:12-49: assert_type((self: Self) -> str, Any) failed [assert-type] +ERROR enums_members.py:84:35-47: `Pet4.species` is not a valid enum member [invalid-literal] +ERROR enums_members.py:85:12-45: assert_type((self: Self) -> None, Any) failed [assert-type] +ERROR enums_members.py:85:33-43: `Pet4.speak` is not a valid enum member [invalid-literal] +ERROR enums_members.py:100:12-62: assert_type(Literal[TrafficLight.AMBER], Literal[TrafficLight.YELLOW]) failed [assert-type] +ERROR enums_members.py:116:12-43: assert_type(nonmember[int], Any) failed [assert-type] +ERROR enums_members.py:116:32-41: `Example.b` is not a valid enum member [invalid-literal] + enums_members.py:128:20-34: revealed type: int [reveal-type] +ERROR enums_members.py:129:20-57: assert_type(int, Any) failed [assert-type] +ERROR enums_members.py:129:43-55: `Example2.__B` is not a valid enum member [invalid-literal] +ERROR enums_members.py:146:12-27: assert_type(Literal[Pet5.DOG], int) failed [assert-type] +ERROR enums_members.py:147:12-28: assert_type(Literal[Pet5.FISH], int) failed [assert-type] """ diff --git a/conformance/results/pyrefly/exceptions_context_managers.toml b/conformance/results/pyrefly/exceptions_context_managers.toml index 8a98cd1f..d9b225e7 100644 --- a/conformance/results/pyrefly/exceptions_context_managers.toml +++ b/conformance/results/pyrefly/exceptions_context_managers.toml @@ -8,6 +8,6 @@ Line 50: Unexpected errors ['assert_type(str, int | str) failed [assert-type]'] Line 57: Unexpected errors ['assert_type(str, int | str) failed [assert-type]'] """ output = """ -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/exceptions_context_managers.py:50:16-30: assert_type(str, int | str) failed [assert-type] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/exceptions_context_managers.py:57:16-30: assert_type(str, int | str) failed [assert-type] +ERROR exceptions_context_managers.py:50:16-30: assert_type(str, int | str) failed [assert-type] +ERROR exceptions_context_managers.py:57:16-30: assert_type(str, int | str) failed [assert-type] """ diff --git a/conformance/results/pyrefly/generics_base_class.toml b/conformance/results/pyrefly/generics_base_class.toml index bcae642c..3c9ace88 100644 --- a/conformance/results/pyrefly/generics_base_class.toml +++ b/conformance/results/pyrefly/generics_base_class.toml @@ -7,10 +7,10 @@ errors_diff = """ Line 98: Expected 1 errors """ output = """ -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_base_class.py:26:26-27: Argument `SymbolTable` is not assignable to parameter `x` with type `dict[str, list[object]]` in function `takes_dict_incorrect` [bad-argument-type] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_base_class.py:29:14-24: `Generic` is not allowed in this context [invalid-annotation] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_base_class.py:30:8-15: Expected a type argument for `Generic` [invalid-annotation] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_base_class.py:49:22-42: Expected 1 type argument for `LinkedList`, got 2 [bad-specialization] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_base_class.py:61:18-34: Expected 1 type argument for `MyDict`, got 2 [bad-specialization] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_base_class.py:68:28-29: Duplicated type parameter declaration `T` [invalid-inheritance] +ERROR generics_base_class.py:26:26-27: Argument `SymbolTable` is not assignable to parameter `x` with type `dict[str, list[object]]` in function `takes_dict_incorrect` [bad-argument-type] +ERROR generics_base_class.py:29:14-24: `Generic` is not allowed in this context [invalid-annotation] +ERROR generics_base_class.py:30:8-15: Expected a type argument for `Generic` [invalid-annotation] +ERROR generics_base_class.py:49:22-42: Expected 1 type argument for `LinkedList`, got 2 [bad-specialization] +ERROR generics_base_class.py:61:18-34: Expected 1 type argument for `MyDict`, got 2 [bad-specialization] +ERROR generics_base_class.py:68:28-29: Duplicated type parameter declaration `T` [invalid-inheritance] """ diff --git a/conformance/results/pyrefly/generics_basic.toml b/conformance/results/pyrefly/generics_basic.toml index 331dd0f2..209981f5 100644 --- a/conformance/results/pyrefly/generics_basic.toml +++ b/conformance/results/pyrefly/generics_basic.toml @@ -12,22 +12,22 @@ Line 67: Unexpected errors ['assert_type(MyStr, str) failed [assert-type]'] Line 68: Unexpected errors ['assert_type(MyStr, str) failed [assert-type]', 'Argument `str` is not assignable to parameter `y` with type `MyStr` in function `concat` [bad-argument-type]'] """ output = """ -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_basic.py:34:12-17: `+` is not supported between `AnyStr` and `AnyStr` [unsupported-operation] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_basic.py:34:12-17: `+` is not supported between `AnyStr` and `AnyStr` [unsupported-operation] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_basic.py:34:12-17: Returned type `bytes | Unknown` is not assignable to declared return type `AnyStr` [bad-return] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_basic.py:40:15-16: Argument `bytes` is not assignable to parameter `y` with type `str` in function `concat` [bad-argument-type] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_basic.py:41:15-16: Argument `str` is not assignable to parameter `y` with type `bytes` in function `concat` [bad-argument-type] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_basic.py:55:53-60: Type variable bounds and constraints must be concrete [invalid-annotation] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_basic.py:67:16-35: assert_type(MyStr, str) failed [assert-type] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_basic.py:68:16-35: assert_type(MyStr, str) failed [assert-type] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_basic.py:68:27-28: Argument `str` is not assignable to parameter `y` with type `MyStr` in function `concat` [bad-argument-type] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_basic.py:69:15-16: Argument `bytes` is not assignable to parameter `y` with type `MyStr` in function `concat` [bad-argument-type] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_basic.py:121:24-25: Duplicated type parameter declaration `T` [invalid-inheritance] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_basic.py:157:8-9: Cannot index into `MyMap1[str, int]` [index-error] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_basic.py:158:8-9: Cannot index into `MyMap2[int, str]` [index-error] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_basic.py:162:7-11: Expected a type variable, got `int` [invalid-type-var] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_basic.py:163:7-11: Expected a type variable, got `int` [invalid-type-var] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_basic.py:171:7-11: Class `Bad3` uses type variables not specified in `Generic` or `Protocol` base [invalid-type-var] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_basic.py:172:7-11: Class `Bad4` uses type variables not specified in `Generic` or `Protocol` base [invalid-type-var] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_basic.py:208:7-26: Metaclass may not be an unbound generic [invalid-inheritance] +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:34:12-17: Returned type `bytes | Unknown` is not assignable to declared return type `AnyStr` [bad-return] +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:55:53-60: Type variable bounds and constraints must be concrete [invalid-annotation] +ERROR generics_basic.py:67:16-35: assert_type(MyStr, str) failed [assert-type] +ERROR generics_basic.py:68:16-35: assert_type(MyStr, str) failed [assert-type] +ERROR generics_basic.py:68:27-28: Argument `str` is not assignable to parameter `y` with type `MyStr` in function `concat` [bad-argument-type] +ERROR generics_basic.py:69:15-16: Argument `bytes` is not assignable to parameter `y` with type `MyStr` in function `concat` [bad-argument-type] +ERROR generics_basic.py:121:24-25: Duplicated type parameter declaration `T` [invalid-inheritance] +ERROR generics_basic.py:157:8-9: Cannot index into `MyMap1[str, int]` [index-error] +ERROR generics_basic.py:158:8-9: Cannot index into `MyMap2[int, str]` [index-error] +ERROR generics_basic.py:162:7-11: Expected a type variable, got `int` [invalid-type-var] +ERROR generics_basic.py:163:7-11: Expected a type variable, got `int` [invalid-type-var] +ERROR generics_basic.py:171:7-11: Class `Bad3` uses type variables not specified in `Generic` or `Protocol` base [invalid-type-var] +ERROR generics_basic.py:172:7-11: Class `Bad4` uses type variables not specified in `Generic` or `Protocol` base [invalid-type-var] +ERROR generics_basic.py:208:7-26: Metaclass may not be an unbound generic [invalid-inheritance] """ diff --git a/conformance/results/pyrefly/generics_defaults.toml b/conformance/results/pyrefly/generics_defaults.toml index c8cf6291..4b361852 100644 --- a/conformance/results/pyrefly/generics_defaults.toml +++ b/conformance/results/pyrefly/generics_defaults.toml @@ -9,13 +9,13 @@ Line 169: Unexpected errors ['assert_type([DefaultIntT](Foo7[DefaultIntT]) -> Fo Line 170: Unexpected errors ['assert_type(Any, int) failed [assert-type]', 'Instance-only attribute `attr` of class `Foo7` is not visible on the class [missing-attribute]'] """ output = """ -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_defaults.py:24:7-31: Type parameter `T` without a default cannot follow type parameter `DefaultStrT` with a default [invalid-type-var] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_defaults.py:50:1-20: Expected 5 type arguments for `AllTheDefaults`, got 1 [bad-specialization] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_defaults.py:107:51-54: Expected default `int` of `Invalid1` to be assignable to the upper bound of `str` [invalid-type-var] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_defaults.py:114:52-55: Expected default `int` of `Invalid2` to be one of the following constraints: `float`, `str` [invalid-type-var] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_defaults.py:130:12-27: assert_type(Any, int) failed [assert-type] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_defaults.py:141:7-11: TypeVar `T5` with a default cannot follow TypeVarTuple `Ts` [invalid-type-var] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_defaults.py:169:12-57: assert_type([DefaultIntT](Foo7[DefaultIntT]) -> Foo7[DefaultIntT], (Foo7[int]) -> Foo7[int]) failed [assert-type] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_defaults.py:170:12-28: assert_type(Any, int) failed [assert-type] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_defaults.py:170:13-22: Instance-only attribute `attr` of class `Foo7` is not visible on the class [missing-attribute] +ERROR generics_defaults.py:24:7-31: Type parameter `T` without a default cannot follow type parameter `DefaultStrT` with a default [invalid-type-var] +ERROR generics_defaults.py:50:1-20: Expected 5 type arguments for `AllTheDefaults`, got 1 [bad-specialization] +ERROR generics_defaults.py:107:51-54: Expected default `int` of `Invalid1` to be assignable to the upper bound of `str` [invalid-type-var] +ERROR generics_defaults.py:114:52-55: Expected default `int` of `Invalid2` to be one of the following constraints: `float`, `str` [invalid-type-var] +ERROR generics_defaults.py:130:12-27: assert_type(Any, int) failed [assert-type] +ERROR generics_defaults.py:141:7-11: TypeVar `T5` with a default cannot follow TypeVarTuple `Ts` [invalid-type-var] +ERROR generics_defaults.py:169:12-57: assert_type([DefaultIntT](Foo7[DefaultIntT]) -> Foo7[DefaultIntT], (Foo7[int]) -> Foo7[int]) failed [assert-type] +ERROR generics_defaults.py:170:12-28: assert_type(Any, int) failed [assert-type] +ERROR generics_defaults.py:170:13-22: Instance-only attribute `attr` of class `Foo7` is not visible on the class [missing-attribute] """ diff --git a/conformance/results/pyrefly/generics_defaults_referential.toml b/conformance/results/pyrefly/generics_defaults_referential.toml index c57630b2..1d60cb5c 100644 --- a/conformance/results/pyrefly/generics_defaults_referential.toml +++ b/conformance/results/pyrefly/generics_defaults_referential.toml @@ -6,14 +6,14 @@ Line 67: Unexpected errors ['Expected default `TypeVar[X1]` of `AlsoOk1` to be a Line 77: Unexpected errors ['Expected default `TypeVar[Y2]` of `AlsoOk2` to be one of the following constraints: `int`, `str`, `bool` [invalid-type-var]'] """ output = """ -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_defaults_referential.py:36:13-15: Argument `Literal['']` is not assignable to parameter `b` with type `int` in function `Foo.__init__` [bad-argument-type] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_defaults_referential.py:37:10-12: Argument `Literal['']` is not assignable to parameter `a` with type `int` in function `Foo.__init__` [bad-argument-type] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_defaults_referential.py:53:7-13: Default of type parameter `Start2T` refers to out-of-scope type parameter `StopT` [invalid-type-var] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_defaults_referential.py:60:11-15: Default of type parameter `S2` refers to out-of-scope type parameter `S1` [invalid-type-var] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_defaults_referential.py:66:30-32: Expected default `TypeVar[X1]` of `Ok1` to be assignable to the upper bound of `float` [invalid-type-var] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_defaults_referential.py:67:38-40: Expected default `TypeVar[X1]` of `AlsoOk1` to be assignable to the upper bound of `int` [invalid-type-var] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_defaults_referential.py:68:40-42: Expected default `TypeVar[X1]` of `Invalid1` to be assignable to the upper bound of `str` [invalid-type-var] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_defaults_referential.py:74:52-54: Expected default `TypeVar[Y1]` of `Invalid2` to be one of the following constraints: `float`, `str` [invalid-type-var] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_defaults_referential.py:77:54-56: Expected default `TypeVar[Y2]` of `AlsoOk2` to be one of the following constraints: `int`, `str`, `bool` [invalid-type-var] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_defaults_referential.py:78:63-65: Expected default `TypeVar[Y2]` of `AlsoInvalid2` to be one of the following constraints: `bool`, `complex` [invalid-type-var] +ERROR generics_defaults_referential.py:36:13-15: Argument `Literal['']` is not assignable to parameter `b` with type `int` in function `Foo.__init__` [bad-argument-type] +ERROR generics_defaults_referential.py:37:10-12: Argument `Literal['']` is not assignable to parameter `a` with type `int` in function `Foo.__init__` [bad-argument-type] +ERROR generics_defaults_referential.py:53:7-13: Default of type parameter `Start2T` refers to out-of-scope type parameter `StopT` [invalid-type-var] +ERROR generics_defaults_referential.py:60:11-15: Default of type parameter `S2` refers to out-of-scope type parameter `S1` [invalid-type-var] +ERROR generics_defaults_referential.py:66:30-32: Expected default `TypeVar[X1]` of `Ok1` to be assignable to the upper bound of `float` [invalid-type-var] +ERROR generics_defaults_referential.py:67:38-40: Expected default `TypeVar[X1]` of `AlsoOk1` to be assignable to the upper bound of `int` [invalid-type-var] +ERROR generics_defaults_referential.py:68:40-42: Expected default `TypeVar[X1]` of `Invalid1` to be assignable to the upper bound of `str` [invalid-type-var] +ERROR generics_defaults_referential.py:74:52-54: Expected default `TypeVar[Y1]` of `Invalid2` to be one of the following constraints: `float`, `str` [invalid-type-var] +ERROR generics_defaults_referential.py:77:54-56: Expected default `TypeVar[Y2]` of `AlsoOk2` to be one of the following constraints: `int`, `str`, `bool` [invalid-type-var] +ERROR generics_defaults_referential.py:78:63-65: Expected default `TypeVar[Y2]` of `AlsoInvalid2` to be one of the following constraints: `bool`, `complex` [invalid-type-var] """ diff --git a/conformance/results/pyrefly/generics_defaults_specialization.toml b/conformance/results/pyrefly/generics_defaults_specialization.toml index d89049e1..009497ad 100644 --- a/conformance/results/pyrefly/generics_defaults_specialization.toml +++ b/conformance/results/pyrefly/generics_defaults_specialization.toml @@ -1,7 +1,8 @@ +conformant = "Pass" conformance_automated = "Pass" errors_diff = """ """ output = """ -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_defaults_specialization.py:30:1-19: Expected 1 type argument for `MyAlias`, got 2 [bad-specialization] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_defaults_specialization.py:55:1-9: Expected 0 type arguments for `Foo`, got 1 [bad-specialization] +ERROR generics_defaults_specialization.py:30:1-19: Expected 1 type argument for `MyAlias`, got 2 [bad-specialization] +ERROR generics_defaults_specialization.py:55:1-9: Expected 0 type arguments for `Foo`, got 1 [bad-specialization] """ diff --git a/conformance/results/pyrefly/generics_paramspec_basic.toml b/conformance/results/pyrefly/generics_paramspec_basic.toml index 99912409..5529454d 100644 --- a/conformance/results/pyrefly/generics_paramspec_basic.toml +++ b/conformance/results/pyrefly/generics_paramspec_basic.toml @@ -1,14 +1,15 @@ +conformant = "Pass" conformance_automated = "Pass" errors_diff = """ """ output = """ -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_paramspec_basic.py:10:13-31: ParamSpec must be assigned to a variable named `NotIt` [invalid-param-spec] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_paramspec_basic.py:15:18-19: `ParamSpec[P]` is not allowed in this context [invalid-annotation] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_paramspec_basic.py:23:14-15: `ParamSpec` is not allowed in this context [invalid-annotation] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_paramspec_basic.py:23:20-21: `ParamSpec` is not allowed in this context [invalid-annotation] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_paramspec_basic.py:27:14-33: `Concatenate[int, P]` is not allowed in this context [invalid-annotation] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_paramspec_basic.py:31:14-21: `ParamSpec` cannot be used for type parameter [invalid-param-spec] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_paramspec_basic.py:35:35-36: `ParamSpec` is not allowed in this context [invalid-annotation] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_paramspec_basic.py:39:18-19: `ParamSpec` is not allowed in this context [invalid-annotation] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_paramspec_basic.py:39:31-32: `ParamSpec` is not allowed in this context [invalid-annotation] +ERROR generics_paramspec_basic.py:10:13-31: ParamSpec must be assigned to a variable named `NotIt` [invalid-param-spec] +ERROR generics_paramspec_basic.py:15:18-19: `ParamSpec[P]` is not allowed in this context [invalid-annotation] +ERROR generics_paramspec_basic.py:23:14-15: `ParamSpec` is not allowed in this context [invalid-annotation] +ERROR generics_paramspec_basic.py:23:20-21: `ParamSpec` is not allowed in this context [invalid-annotation] +ERROR generics_paramspec_basic.py:27:14-33: `Concatenate[int, P]` is not allowed in this context [invalid-annotation] +ERROR generics_paramspec_basic.py:31:14-21: `ParamSpec` cannot be used for type parameter [invalid-param-spec] +ERROR generics_paramspec_basic.py:35:35-36: `ParamSpec` is not allowed in this context [invalid-annotation] +ERROR generics_paramspec_basic.py:39:18-19: `ParamSpec` is not allowed in this context [invalid-annotation] +ERROR generics_paramspec_basic.py:39:31-32: `ParamSpec` is not allowed in this context [invalid-annotation] """ diff --git a/conformance/results/pyrefly/generics_paramspec_components.toml b/conformance/results/pyrefly/generics_paramspec_components.toml index 4c078245..1dbe5ff1 100644 --- a/conformance/results/pyrefly/generics_paramspec_components.toml +++ b/conformance/results/pyrefly/generics_paramspec_components.toml @@ -7,23 +7,23 @@ errors_diff = """ Line 30: Expected 1 errors """ output = """ -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_paramspec_components.py:17:25-33: `ParamSpec` **kwargs is only allowed in a **kwargs annotation [invalid-annotation] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_paramspec_components.py:17:45-51: `ParamSpec` *args is only allowed in an *args annotation [invalid-annotation] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_paramspec_components.py:20:23-29: `ParamSpec` *args is only allowed in an *args annotation [invalid-annotation] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_paramspec_components.py:23:5-24:13: `ParamSpec` *args and **kwargs must be used together [invalid-param-spec] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_paramspec_components.py:23:46-52: `ParamSpec` *args is only allowed in an *args annotation [invalid-annotation] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_paramspec_components.py:26:5-27:13: `ParamSpec` *args and **kwargs must be used together [invalid-param-spec] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_paramspec_components.py:35:18-24: `ParamSpec` *args is only allowed in an *args annotation [invalid-annotation] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_paramspec_components.py:36:20-28: `ParamSpec` **kwargs is only allowed in a **kwargs annotation [invalid-annotation] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_paramspec_components.py:38:5-39:13: `ParamSpec` *args and **kwargs must be used together [invalid-param-spec] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_paramspec_components.py:41:5-42:13: `ParamSpec` *args and **kwargs must be used together [invalid-param-spec] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_paramspec_components.py:49:10-27: Expected *-unpacked P.args and **-unpacked P.kwargs [invalid-param-spec] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_paramspec_components.py:51:11-12: Expected 0 positional arguments, got 1 [bad-argument-count] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_paramspec_components.py:60:28-34: Keyword-only parameter `s` may not appear after ParamSpec args parameter [bad-function-definition] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_paramspec_components.py:70:10-30: Expected *-unpacked P.args and **-unpacked P.kwargs [invalid-param-spec] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_paramspec_components.py:72:10-27: Expected 1 more positional argument [bad-argument-count] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_paramspec_components.py:83:13-14: Unexpected keyword argument `x` in function `foo` [unexpected-keyword] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_paramspec_components.py:83:13-16: Expected 1 more positional argument in function `foo` [bad-argument-count] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_paramspec_components.py:98:20-23: Argument `Literal['A']` is not assignable to parameter `a` with type `int` in function `twice` [bad-argument-type] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_paramspec_components.py:98:25-26: Argument `Literal[1]` is not assignable to parameter `b` with type `str` in function `twice` [bad-argument-type] +ERROR generics_paramspec_components.py:17:25-33: `ParamSpec` **kwargs is only allowed in a **kwargs annotation [invalid-annotation] +ERROR generics_paramspec_components.py:17:45-51: `ParamSpec` *args is only allowed in an *args annotation [invalid-annotation] +ERROR generics_paramspec_components.py:20:23-29: `ParamSpec` *args is only allowed in an *args annotation [invalid-annotation] +ERROR generics_paramspec_components.py:23:5-24:13: `ParamSpec` *args and **kwargs must be used together [invalid-param-spec] +ERROR generics_paramspec_components.py:23:46-52: `ParamSpec` *args is only allowed in an *args annotation [invalid-annotation] +ERROR generics_paramspec_components.py:26:5-27:13: `ParamSpec` *args and **kwargs must be used together [invalid-param-spec] +ERROR generics_paramspec_components.py:35:18-24: `ParamSpec` *args is only allowed in an *args annotation [invalid-annotation] +ERROR generics_paramspec_components.py:36:20-28: `ParamSpec` **kwargs is only allowed in a **kwargs annotation [invalid-annotation] +ERROR generics_paramspec_components.py:38:5-39:13: `ParamSpec` *args and **kwargs must be used together [invalid-param-spec] +ERROR generics_paramspec_components.py:41:5-42:13: `ParamSpec` *args and **kwargs must be used together [invalid-param-spec] +ERROR generics_paramspec_components.py:49:10-27: Expected *-unpacked P.args and **-unpacked P.kwargs [invalid-param-spec] +ERROR generics_paramspec_components.py:51:11-12: Expected 0 positional arguments, got 1 [bad-argument-count] +ERROR generics_paramspec_components.py:60:28-34: Keyword-only parameter `s` may not appear after ParamSpec args parameter [bad-function-definition] +ERROR generics_paramspec_components.py:70:10-30: Expected *-unpacked P.args and **-unpacked P.kwargs [invalid-param-spec] +ERROR generics_paramspec_components.py:72:10-27: Expected 1 more positional argument [bad-argument-count] +ERROR generics_paramspec_components.py:83:13-14: Unexpected keyword argument `x` in function `foo` [unexpected-keyword] +ERROR generics_paramspec_components.py:83:13-16: Expected 1 more positional argument in function `foo` [bad-argument-count] +ERROR generics_paramspec_components.py:98:20-23: Argument `Literal['A']` is not assignable to parameter `a` with type `int` in function `twice` [bad-argument-type] +ERROR generics_paramspec_components.py:98:25-26: Argument `Literal[1]` is not assignable to parameter `b` with type `str` in function `twice` [bad-argument-type] """ diff --git a/conformance/results/pyrefly/generics_paramspec_semantics.toml b/conformance/results/pyrefly/generics_paramspec_semantics.toml index 024db6d8..a62bb475 100644 --- a/conformance/results/pyrefly/generics_paramspec_semantics.toml +++ b/conformance/results/pyrefly/generics_paramspec_semantics.toml @@ -1,16 +1,17 @@ +conformant = "Pass" conformance_automated = "Pass" errors_diff = """ """ output = """ -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_paramspec_semantics.py:26:4-5: Expected argument `a` to be positional [unexpected-keyword] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_paramspec_semantics.py:26:11-12: Expected argument `b` to be positional [unexpected-keyword] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_paramspec_semantics.py:27:9-12: Argument `Literal['A']` is not assignable to parameter `b` with type `bool` [bad-argument-type] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_paramspec_semantics.py:46:17-20: Argument `(y: int, x: str) -> int` is not assignable to parameter `y` with type `(x: int, y: str) -> int` in function `func1` [bad-argument-type] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_paramspec_semantics.py:61:23-37: Argument `(*, y: int) -> int` is not assignable to parameter `y` with type `(*, x: int) -> int` in function `func1` [bad-argument-type] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_paramspec_semantics.py:98:4-5: Argument `Literal[1]` is not assignable to parameter with type `str` [bad-argument-type] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_paramspec_semantics.py:108:4-5: Argument `Literal[1]` is not assignable to parameter `*args` with type `bool` [bad-argument-type] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_paramspec_semantics.py:120:4-5: Argument `Literal[1]` is not assignable to parameter with type `str` [bad-argument-type] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_paramspec_semantics.py:127:1-19: Argument `(x: str) -> int` is not assignable to parameter `x` with type `(int, ParamSpec(@_)) -> int` in function `expects_int_first` [bad-argument-type] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_paramspec_semantics.py:132:1-19: Argument `(*, x: int) -> int` is not assignable to parameter `x` with type `(int, ParamSpec(@_)) -> int` in function `expects_int_first` [bad-argument-type] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_paramspec_semantics.py:137:1-19: Argument `(**kwargs: int) -> int` is not assignable to parameter `x` with type `(int, ParamSpec(@_)) -> int` in function `expects_int_first` [bad-argument-type] +ERROR generics_paramspec_semantics.py:26:4-5: Expected argument `a` to be positional [unexpected-keyword] +ERROR generics_paramspec_semantics.py:26:11-12: Expected argument `b` to be positional [unexpected-keyword] +ERROR generics_paramspec_semantics.py:27:9-12: Argument `Literal['A']` is not assignable to parameter `b` with type `bool` [bad-argument-type] +ERROR generics_paramspec_semantics.py:46:17-20: Argument `(y: int, x: str) -> int` is not assignable to parameter `y` with type `(x: int, y: str) -> int` in function `func1` [bad-argument-type] +ERROR generics_paramspec_semantics.py:61:23-37: Argument `(*, y: int) -> int` is not assignable to parameter `y` with type `(*, x: int) -> int` in function `func1` [bad-argument-type] +ERROR generics_paramspec_semantics.py:98:4-5: Argument `Literal[1]` is not assignable to parameter with type `str` [bad-argument-type] +ERROR generics_paramspec_semantics.py:108:4-5: Argument `Literal[1]` is not assignable to parameter `*args` with type `bool` [bad-argument-type] +ERROR generics_paramspec_semantics.py:120:4-5: Argument `Literal[1]` is not assignable to parameter with type `str` [bad-argument-type] +ERROR generics_paramspec_semantics.py:127:1-19: Argument `(x: str) -> int` is not assignable to parameter `x` with type `(int, ParamSpec(@_)) -> int` in function `expects_int_first` [bad-argument-type] +ERROR generics_paramspec_semantics.py:132:1-19: Argument `(*, x: int) -> int` is not assignable to parameter `x` with type `(int, ParamSpec(@_)) -> int` in function `expects_int_first` [bad-argument-type] +ERROR generics_paramspec_semantics.py:137:1-19: Argument `(**kwargs: int) -> int` is not assignable to parameter `x` with type `(int, ParamSpec(@_)) -> int` in function `expects_int_first` [bad-argument-type] """ diff --git a/conformance/results/pyrefly/generics_paramspec_specialization.toml b/conformance/results/pyrefly/generics_paramspec_specialization.toml index 88c54566..a835b8d1 100644 --- a/conformance/results/pyrefly/generics_paramspec_specialization.toml +++ b/conformance/results/pyrefly/generics_paramspec_specialization.toml @@ -1,10 +1,11 @@ +conformant = "Pass" conformance_automated = "Pass" errors_diff = """ """ output = """ -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_paramspec_specialization.py:44:15-31: Expected a valid ParamSpec expression, got `int` [invalid-param-spec] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_paramspec_specialization.py:54:9-11: Argument `Literal['']` is not assignable to parameter with type `int` [bad-argument-type] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_paramspec_specialization.py:55:16-18: Argument `Literal['']` is not assignable to parameter with type `bool` [bad-argument-type] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_paramspec_specialization.py:60:9-11: Argument `Literal['']` is not assignable to parameter with type `int` [bad-argument-type] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_paramspec_specialization.py:61:16-18: Argument `Literal['']` is not assignable to parameter with type `bool` [bad-argument-type] +ERROR generics_paramspec_specialization.py:44:15-31: Expected a valid ParamSpec expression, got `int` [invalid-param-spec] +ERROR generics_paramspec_specialization.py:54:9-11: Argument `Literal['']` is not assignable to parameter with type `int` [bad-argument-type] +ERROR generics_paramspec_specialization.py:55:16-18: Argument `Literal['']` is not assignable to parameter with type `bool` [bad-argument-type] +ERROR generics_paramspec_specialization.py:60:9-11: Argument `Literal['']` is not assignable to parameter with type `int` [bad-argument-type] +ERROR generics_paramspec_specialization.py:61:16-18: Argument `Literal['']` is not assignable to parameter with type `bool` [bad-argument-type] """ diff --git a/conformance/results/pyrefly/generics_scoping.toml b/conformance/results/pyrefly/generics_scoping.toml index e4c192fa..f73633f3 100644 --- a/conformance/results/pyrefly/generics_scoping.toml +++ b/conformance/results/pyrefly/generics_scoping.toml @@ -14,6 +14,6 @@ Line 95: Expected 1 errors Line 96: Expected 1 errors """ output = """ -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_scoping.py:29:10-13: Argument `Literal['a']` is not assignable to parameter `x` with type `int` in function `MyClass.meth_2` [bad-argument-type] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_scoping.py:65:11-20: Redundant type parameter declaration [invalid-type-var] +ERROR generics_scoping.py:29:10-13: Argument `Literal['a']` is not assignable to parameter `x` with type `int` in function `MyClass.meth_2` [bad-argument-type] +ERROR generics_scoping.py:65:11-20: Redundant type parameter declaration [invalid-type-var] """ diff --git a/conformance/results/pyrefly/generics_self_advanced.toml b/conformance/results/pyrefly/generics_self_advanced.toml index 381cfcaa..f671925c 100644 --- a/conformance/results/pyrefly/generics_self_advanced.toml +++ b/conformance/results/pyrefly/generics_self_advanced.toml @@ -8,8 +8,8 @@ Line 43: Unexpected errors ['assert_type(Any, list[Self]) failed [assert-type]', Line 44: Unexpected errors ['assert_type(Any, Self) failed [assert-type]', 'Instance-only attribute `a` of class `ChildB` is not visible on the class [missing-attribute]'] """ output = """ -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_self_advanced.py:43:20-39: assert_type(Any, list[Self]) failed [assert-type] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_self_advanced.py:43:21-26: Instance-only attribute `a` of class `ChildB` is not visible on the class [missing-attribute] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_self_advanced.py:44:20-36: assert_type(Any, Self) failed [assert-type] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_self_advanced.py:44:21-26: Instance-only attribute `a` of class `ChildB` is not visible on the class [missing-attribute] +ERROR generics_self_advanced.py:43:20-39: assert_type(Any, list[Self]) failed [assert-type] +ERROR generics_self_advanced.py:43:21-26: Instance-only attribute `a` of class `ChildB` is not visible on the class [missing-attribute] +ERROR generics_self_advanced.py:44:20-36: assert_type(Any, Self) failed [assert-type] +ERROR generics_self_advanced.py:44:21-26: Instance-only attribute `a` of class `ChildB` is not visible on the class [missing-attribute] """ diff --git a/conformance/results/pyrefly/generics_self_attributes.toml b/conformance/results/pyrefly/generics_self_attributes.toml index ef615975..e93cf366 100644 --- a/conformance/results/pyrefly/generics_self_attributes.toml +++ b/conformance/results/pyrefly/generics_self_attributes.toml @@ -7,5 +7,5 @@ errors_diff = """ Line 32: Expected 1 errors """ output = """ -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_self_attributes.py:26:38-62: Argument `LinkedList[int]` is not assignable to parameter `next` with type `OrdinalLinkedList | None` in function `OrdinalLinkedList.__init__` [bad-argument-type] +ERROR generics_self_attributes.py:26:38-62: Argument `LinkedList[int]` is not assignable to parameter `next` with type `OrdinalLinkedList | None` in function `OrdinalLinkedList.__init__` [bad-argument-type] """ diff --git a/conformance/results/pyrefly/generics_self_basic.toml b/conformance/results/pyrefly/generics_self_basic.toml index 5f0cfdd1..0e72344d 100644 --- a/conformance/results/pyrefly/generics_self_basic.toml +++ b/conformance/results/pyrefly/generics_self_basic.toml @@ -8,5 +8,5 @@ Line 20: Expected 1 errors Line 33: Expected 1 errors """ output = """ -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_self_basic.py:67:26-35: `type[Self@Container]` is not subscriptable [unsupported-operation] +ERROR generics_self_basic.py:67:26-35: `type[Self@Container]` is not subscriptable [unsupported-operation] """ diff --git a/conformance/results/pyrefly/generics_self_protocols.toml b/conformance/results/pyrefly/generics_self_protocols.toml index 5b4c54c5..41968988 100644 --- a/conformance/results/pyrefly/generics_self_protocols.toml +++ b/conformance/results/pyrefly/generics_self_protocols.toml @@ -7,7 +7,7 @@ errors_diff = """ Line 58: Unexpected errors ['Argument `ReturnConcreteShape` is not assignable to parameter `shape` with type `ShapeProtocol` in function `accepts_shape` [bad-argument-type]'] """ output = """ -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_self_protocols.py:58:19-40: Argument `ReturnConcreteShape` is not assignable to parameter `shape` with type `ShapeProtocol` in function `accepts_shape` [bad-argument-type] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_self_protocols.py:61:19-34: Argument `BadReturnType` is not assignable to parameter `shape` with type `ShapeProtocol` in function `accepts_shape` [bad-argument-type] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_self_protocols.py:64:19-41: Argument `ReturnDifferentClass` is not assignable to parameter `shape` with type `ShapeProtocol` in function `accepts_shape` [bad-argument-type] +ERROR generics_self_protocols.py:58:19-40: Argument `ReturnConcreteShape` is not assignable to parameter `shape` with type `ShapeProtocol` in function `accepts_shape` [bad-argument-type] +ERROR generics_self_protocols.py:61:19-34: Argument `BadReturnType` is not assignable to parameter `shape` with type `ShapeProtocol` in function `accepts_shape` [bad-argument-type] +ERROR generics_self_protocols.py:64:19-41: Argument `ReturnDifferentClass` is not assignable to parameter `shape` with type `ShapeProtocol` in function `accepts_shape` [bad-argument-type] """ diff --git a/conformance/results/pyrefly/generics_self_usage.toml b/conformance/results/pyrefly/generics_self_usage.toml index 5394826c..44c8b560 100644 --- a/conformance/results/pyrefly/generics_self_usage.toml +++ b/conformance/results/pyrefly/generics_self_usage.toml @@ -16,5 +16,5 @@ Line 121: Expected 1 errors Line 125: Expected 1 errors """ output = """ -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_self_usage.py:103:12-16: Invalid base class: `Self` [invalid-inheritance] +ERROR generics_self_usage.py:103:12-16: Invalid base class: `Self` [invalid-inheritance] """ diff --git a/conformance/results/pyrefly/generics_syntax_compatibility.toml b/conformance/results/pyrefly/generics_syntax_compatibility.toml index 8a9785fc..1ed01bde 100644 --- a/conformance/results/pyrefly/generics_syntax_compatibility.toml +++ b/conformance/results/pyrefly/generics_syntax_compatibility.toml @@ -1,9 +1,10 @@ +conformant = "Pass" conformance_automated = "Pass" errors_diff = """ """ output = """ -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_syntax_compatibility.py:14:7-13: Class `ClassA` uses type variables not specified in `Generic` or `Protocol` base [invalid-type-var] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_syntax_compatibility.py:14:22-23: Type parameter K is not included in the type parameter list [invalid-type-var] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_syntax_compatibility.py:26:35-36: Type parameter K is not included in the type parameter list [invalid-type-var] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_syntax_compatibility.py:26:45-46: Type parameter K is not included in the type parameter list [invalid-type-var] +ERROR generics_syntax_compatibility.py:14:7-13: Class `ClassA` uses type variables not specified in `Generic` or `Protocol` base [invalid-type-var] +ERROR generics_syntax_compatibility.py:14:22-23: Type parameter K is not included in the type parameter list [invalid-type-var] +ERROR generics_syntax_compatibility.py:26:35-36: Type parameter K is not included in the type parameter list [invalid-type-var] +ERROR generics_syntax_compatibility.py:26:45-46: Type parameter K is not included in the type parameter list [invalid-type-var] """ diff --git a/conformance/results/pyrefly/generics_syntax_declarations.toml b/conformance/results/pyrefly/generics_syntax_declarations.toml index bce6e15a..d5b47202 100644 --- a/conformance/results/pyrefly/generics_syntax_declarations.toml +++ b/conformance/results/pyrefly/generics_syntax_declarations.toml @@ -1,15 +1,16 @@ +conformant = "Pass" conformance_automated = "Pass" errors_diff = """ """ output = """ -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_syntax_declarations.py:17:7-13: Redundant type parameter declaration [invalid-type-var] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_syntax_declarations.py:25:7-13: Redundant type parameter declaration [invalid-type-var] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_syntax_declarations.py:32:9-21: Object of class `str` has no attribute `is_integer` [missing-attribute] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_syntax_declarations.py:44:21-33: Type variable bounds and constraints must be concrete [invalid-annotation] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_syntax_declarations.py:48:17-27: Expected a type form, got instance of `list[type[int] | type[str]]` [not-a-type] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_syntax_declarations.py:60:17-19: Expected at least 2 constraints in TypeVar `T`, got 0 [invalid-type-var] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_syntax_declarations.py:64:17-23: Expected at least 2 constraints in TypeVar `T`, got 1 [invalid-type-var] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_syntax_declarations.py:71:17-19: Expected a type form, got instance of `tuple[type[bytes], type[str]]` [not-a-type] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_syntax_declarations.py:75:18-19: Expected a type form, got instance of `Literal[3]` [not-a-type] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_syntax_declarations.py:79:23-24: Could not find name `S` [unknown-name] +ERROR generics_syntax_declarations.py:17:7-13: Redundant type parameter declaration [invalid-type-var] +ERROR generics_syntax_declarations.py:25:7-13: Redundant type parameter declaration [invalid-type-var] +ERROR generics_syntax_declarations.py:32:9-21: Object of class `str` has no attribute `is_integer` [missing-attribute] +ERROR generics_syntax_declarations.py:44:21-33: Type variable bounds and constraints must be concrete [invalid-annotation] +ERROR generics_syntax_declarations.py:48:17-27: Expected a type form, got instance of `list[type[int] | type[str]]` [not-a-type] +ERROR generics_syntax_declarations.py:60:17-19: Expected at least 2 constraints in TypeVar `T`, got 0 [invalid-type-var] +ERROR generics_syntax_declarations.py:64:17-23: Expected at least 2 constraints in TypeVar `T`, got 1 [invalid-type-var] +ERROR generics_syntax_declarations.py:71:17-19: Expected a type form, got instance of `tuple[type[bytes], type[str]]` [not-a-type] +ERROR generics_syntax_declarations.py:75:18-19: Expected a type form, got instance of `Literal[3]` [not-a-type] +ERROR generics_syntax_declarations.py:79:23-24: Could not find name `S` [unknown-name] """ diff --git a/conformance/results/pyrefly/generics_syntax_infer_variance.toml b/conformance/results/pyrefly/generics_syntax_infer_variance.toml index a1328db4..eec9124d 100644 --- a/conformance/results/pyrefly/generics_syntax_infer_variance.toml +++ b/conformance/results/pyrefly/generics_syntax_infer_variance.toml @@ -1,23 +1,24 @@ +conformant = "Pass" conformance_automated = "Pass" errors_diff = """ """ output = """ -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_syntax_infer_variance.py:15:36-55: Contradictory variance specifications [invalid-type-var] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_syntax_infer_variance.py:17:40-59: Contradictory variance specifications [invalid-type-var] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_syntax_infer_variance.py:29:35-62: `ShouldBeCovariant1[float]` is not assignable to `ShouldBeCovariant1[int]` [bad-assignment] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_syntax_infer_variance.py:37:35-62: `ShouldBeCovariant2[float]` is not assignable to `ShouldBeCovariant2[int]` [bad-assignment] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_syntax_infer_variance.py:46:35-62: `ShouldBeCovariant3[float]` is not assignable to `ShouldBeCovariant3[int]` [bad-assignment] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_syntax_infer_variance.py:75:34-64: `ShouldBeCovariant5[float]` is not assignable to `ShouldBeCovariant5[int]` [bad-assignment] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_syntax_infer_variance.py:86:34-64: `ShouldBeCovariant6[float]` is not assignable to `ShouldBeCovariant6[int]` [bad-assignment] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_syntax_infer_variance.py:102:38-64: `ShouldBeInvariant1[int]` is not assignable to `ShouldBeInvariant1[float]` [bad-assignment] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_syntax_infer_variance.py:103:36-66: `ShouldBeInvariant1[float]` is not assignable to `ShouldBeInvariant1[int]` [bad-assignment] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_syntax_infer_variance.py:117:38-64: `ShouldBeInvariant2[int]` is not assignable to `ShouldBeInvariant2[float]` [bad-assignment] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_syntax_infer_variance.py:118:36-66: `ShouldBeInvariant2[float]` is not assignable to `ShouldBeInvariant2[int]` [bad-assignment] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_syntax_infer_variance.py:125:43-73: `ShouldBeInvariant3[int, str]` is not assignable to `ShouldBeInvariant3[float, str]` [bad-assignment] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_syntax_infer_variance.py:126:41-73: `ShouldBeInvariant3[float, str]` is not assignable to `ShouldBeInvariant3[int, str]` [bad-assignment] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_syntax_infer_variance.py:127:43-73: `ShouldBeInvariant3[str, int]` is not assignable to `ShouldBeInvariant3[str, float]` [bad-assignment] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_syntax_infer_variance.py:128:41-73: `ShouldBeInvariant3[str, float]` is not assignable to `ShouldBeInvariant3[str, int]` [bad-assignment] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_syntax_infer_variance.py:136:38-64: `ShouldBeInvariant4[int]` is not assignable to `ShouldBeInvariant4[float]` [bad-assignment] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_syntax_infer_variance.py:144:38-64: `ShouldBeInvariant5[int]` is not assignable to `ShouldBeInvariant5[float]` [bad-assignment] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_syntax_infer_variance.py:155:45-75: `ShouldBeContravariant1[int]` is not assignable to `ShouldBeContravariant1[float]` [bad-assignment] +ERROR generics_syntax_infer_variance.py:15:36-55: Contradictory variance specifications [invalid-type-var] +ERROR generics_syntax_infer_variance.py:17:40-59: Contradictory variance specifications [invalid-type-var] +ERROR generics_syntax_infer_variance.py:29:35-62: `ShouldBeCovariant1[float]` is not assignable to `ShouldBeCovariant1[int]` [bad-assignment] +ERROR generics_syntax_infer_variance.py:37:35-62: `ShouldBeCovariant2[float]` is not assignable to `ShouldBeCovariant2[int]` [bad-assignment] +ERROR generics_syntax_infer_variance.py:46:35-62: `ShouldBeCovariant3[float]` is not assignable to `ShouldBeCovariant3[int]` [bad-assignment] +ERROR generics_syntax_infer_variance.py:75:34-64: `ShouldBeCovariant5[float]` is not assignable to `ShouldBeCovariant5[int]` [bad-assignment] +ERROR generics_syntax_infer_variance.py:86:34-64: `ShouldBeCovariant6[float]` is not assignable to `ShouldBeCovariant6[int]` [bad-assignment] +ERROR generics_syntax_infer_variance.py:102:38-64: `ShouldBeInvariant1[int]` is not assignable to `ShouldBeInvariant1[float]` [bad-assignment] +ERROR generics_syntax_infer_variance.py:103:36-66: `ShouldBeInvariant1[float]` is not assignable to `ShouldBeInvariant1[int]` [bad-assignment] +ERROR generics_syntax_infer_variance.py:117:38-64: `ShouldBeInvariant2[int]` is not assignable to `ShouldBeInvariant2[float]` [bad-assignment] +ERROR generics_syntax_infer_variance.py:118:36-66: `ShouldBeInvariant2[float]` is not assignable to `ShouldBeInvariant2[int]` [bad-assignment] +ERROR generics_syntax_infer_variance.py:125:43-73: `ShouldBeInvariant3[int, str]` is not assignable to `ShouldBeInvariant3[float, str]` [bad-assignment] +ERROR generics_syntax_infer_variance.py:126:41-73: `ShouldBeInvariant3[float, str]` is not assignable to `ShouldBeInvariant3[int, str]` [bad-assignment] +ERROR generics_syntax_infer_variance.py:127:43-73: `ShouldBeInvariant3[str, int]` is not assignable to `ShouldBeInvariant3[str, float]` [bad-assignment] +ERROR generics_syntax_infer_variance.py:128:41-73: `ShouldBeInvariant3[str, float]` is not assignable to `ShouldBeInvariant3[str, int]` [bad-assignment] +ERROR generics_syntax_infer_variance.py:136:38-64: `ShouldBeInvariant4[int]` is not assignable to `ShouldBeInvariant4[float]` [bad-assignment] +ERROR generics_syntax_infer_variance.py:144:38-64: `ShouldBeInvariant5[int]` is not assignable to `ShouldBeInvariant5[float]` [bad-assignment] +ERROR generics_syntax_infer_variance.py:155:45-75: `ShouldBeContravariant1[int]` is not assignable to `ShouldBeContravariant1[float]` [bad-assignment] """ diff --git a/conformance/results/pyrefly/generics_syntax_scoping.toml b/conformance/results/pyrefly/generics_syntax_scoping.toml index 21393187..c0270e15 100644 --- a/conformance/results/pyrefly/generics_syntax_scoping.toml +++ b/conformance/results/pyrefly/generics_syntax_scoping.toml @@ -12,12 +12,12 @@ Line 67: Unexpected errors ['assert_type(Any, int) failed [assert-type]'] Line 116: Unexpected errors ['assert_type(type[T], TypeVar) failed [assert-type]'] """ output = """ -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_syntax_scoping.py:14:20-31: Type variable bounds and constraints must be concrete [invalid-annotation] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_syntax_scoping.py:18:26-27: Expected a type form, got instance of `int` [not-a-type] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_syntax_scoping.py:35:7-8: `T` is uninitialized [unbound-name] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_syntax_scoping.py:44:17-18: `T` is uninitialized [unbound-name] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_syntax_scoping.py:44:17-18: Expected a type form, got instance of `int` [not-a-type] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_syntax_scoping.py:66:20-21: Found `S`, but it was not the global scope [unknown-name] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_syntax_scoping.py:67:24-32: assert_type(Any, int) failed [assert-type] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_syntax_scoping.py:116:24-36: assert_type(type[T], TypeVar) failed [assert-type] +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:66:20-21: Found `S`, but it was not the global scope [unknown-name] +ERROR generics_syntax_scoping.py:67:24-32: assert_type(Any, int) failed [assert-type] +ERROR generics_syntax_scoping.py:116:24-36: assert_type(type[T], TypeVar) failed [assert-type] """ diff --git a/conformance/results/pyrefly/generics_type_erasure.toml b/conformance/results/pyrefly/generics_type_erasure.toml index 8b46ccea..dbbeeacb 100644 --- a/conformance/results/pyrefly/generics_type_erasure.toml +++ b/conformance/results/pyrefly/generics_type_erasure.toml @@ -1,12 +1,13 @@ +conformant = "Pass" conformance_automated = "Pass" errors_diff = """ """ output = """ -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_type_erasure.py:38:16-18: Argument `Literal['']` is not assignable to parameter `label` with type `int | None` in function `Node.__init__` [bad-argument-type] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_type_erasure.py:40:16-17: Argument `Literal[0]` is not assignable to parameter `label` with type `str | None` in function `Node.__init__` [bad-argument-type] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_type_erasure.py:42:1-16: Instance-only attribute `label` of class `Node` is not visible on the class [no-access] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_type_erasure.py:43:1-16: Instance-only attribute `label` of class `Node` is not visible on the class [missing-attribute] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_type_erasure.py:44:1-11: Instance-only attribute `label` of class `Node` is not visible on the class [no-access] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_type_erasure.py:45:1-11: Instance-only attribute `label` of class `Node` is not visible on the class [missing-attribute] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_type_erasure.py:46:1-15: Instance-only attribute `label` of class `Node` is not visible on the class [missing-attribute] +ERROR generics_type_erasure.py:38:16-18: Argument `Literal['']` is not assignable to parameter `label` with type `int | None` in function `Node.__init__` [bad-argument-type] +ERROR generics_type_erasure.py:40:16-17: Argument `Literal[0]` is not assignable to parameter `label` with type `str | None` in function `Node.__init__` [bad-argument-type] +ERROR generics_type_erasure.py:42:1-16: Instance-only attribute `label` of class `Node` is not visible on the class [no-access] +ERROR generics_type_erasure.py:43:1-16: Instance-only attribute `label` of class `Node` is not visible on the class [missing-attribute] +ERROR generics_type_erasure.py:44:1-11: Instance-only attribute `label` of class `Node` is not visible on the class [no-access] +ERROR generics_type_erasure.py:45:1-11: Instance-only attribute `label` of class `Node` is not visible on the class [missing-attribute] +ERROR generics_type_erasure.py:46:1-15: Instance-only attribute `label` of class `Node` is not visible on the class [missing-attribute] """ diff --git a/conformance/results/pyrefly/generics_typevartuple_args.toml b/conformance/results/pyrefly/generics_typevartuple_args.toml index bc195351..6656023b 100644 --- a/conformance/results/pyrefly/generics_typevartuple_args.toml +++ b/conformance/results/pyrefly/generics_typevartuple_args.toml @@ -1,14 +1,15 @@ +conformant = "Pass" conformance_automated = "Pass" errors_diff = """ """ output = """ -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_typevartuple_args.py:33:8-19: Unpacked argument `tuple[Literal[0], Literal['']]` is not assignable to parameter `*args` with type `tuple[*@_, Env]` in function `exec_le` [bad-argument-type] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_typevartuple_args.py:34:8-30: Unpacked argument `tuple[Literal[0], Literal['']]` is not assignable to parameter `*args` with type `tuple[*@_, Env]` in function `exec_le` [bad-argument-type] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_typevartuple_args.py:48:6-17: Unpacked argument `tuple[Literal[1], Literal['2'], Literal[3]]` is not assignable to parameter `*args` with type `tuple[int, ...]` in function `func1` [bad-argument-type] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_typevartuple_args.py:57:6-16: Unpacked argument `tuple[Literal[1], Literal[1], Literal['']]` is not assignable to parameter `*args` with type `tuple[int, *tuple[str, ...], str]` in function `func2` [bad-argument-type] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_typevartuple_args.py:58:6-9: Unpacked argument `tuple[Literal[1]]` is not assignable to parameter `*args` with type `tuple[int, *tuple[str, ...], str]` in function `func2` [bad-argument-type] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_typevartuple_args.py:59:6-10: Unpacked argument `tuple[Literal['']]` is not assignable to parameter `*args` with type `tuple[int, *tuple[str, ...], str]` in function `func2` [bad-argument-type] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_typevartuple_args.py:67:6-9: Unpacked argument `tuple[Literal[1]]` is not assignable to parameter `*args` with type `tuple[int, str]` in function `func3` [bad-argument-type] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_typevartuple_args.py:75:13-19: Argument `tuple[Literal[1], Literal[2]]` is not assignable to parameter `*args` with type `tuple[int]` in function `func4` [bad-argument-type] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_typevartuple_args.py:76:13-19: Argument `tuple[Literal['1']]` is not assignable to parameter `*args` with type `tuple[int]` in function `func4` [bad-argument-type] +ERROR generics_typevartuple_args.py:33:8-19: Unpacked argument `tuple[Literal[0], Literal['']]` is not assignable to parameter `*args` with type `tuple[*@_, Env]` in function `exec_le` [bad-argument-type] +ERROR generics_typevartuple_args.py:34:8-30: Unpacked argument `tuple[Literal[0], Literal['']]` is not assignable to parameter `*args` with type `tuple[*@_, Env]` in function `exec_le` [bad-argument-type] +ERROR generics_typevartuple_args.py:48:6-17: Unpacked argument `tuple[Literal[1], Literal['2'], Literal[3]]` is not assignable to parameter `*args` with type `tuple[int, ...]` in function `func1` [bad-argument-type] +ERROR generics_typevartuple_args.py:57:6-16: Unpacked argument `tuple[Literal[1], Literal[1], Literal['']]` is not assignable to parameter `*args` with type `tuple[int, *tuple[str, ...], str]` in function `func2` [bad-argument-type] +ERROR generics_typevartuple_args.py:58:6-9: Unpacked argument `tuple[Literal[1]]` is not assignable to parameter `*args` with type `tuple[int, *tuple[str, ...], str]` in function `func2` [bad-argument-type] +ERROR generics_typevartuple_args.py:59:6-10: Unpacked argument `tuple[Literal['']]` is not assignable to parameter `*args` with type `tuple[int, *tuple[str, ...], str]` in function `func2` [bad-argument-type] +ERROR generics_typevartuple_args.py:67:6-9: Unpacked argument `tuple[Literal[1]]` is not assignable to parameter `*args` with type `tuple[int, str]` in function `func3` [bad-argument-type] +ERROR generics_typevartuple_args.py:75:13-19: Argument `tuple[Literal[1], Literal[2]]` is not assignable to parameter `*args` with type `tuple[int]` in function `func4` [bad-argument-type] +ERROR generics_typevartuple_args.py:76:13-19: Argument `tuple[Literal['1']]` is not assignable to parameter `*args` with type `tuple[int]` in function `func4` [bad-argument-type] """ diff --git a/conformance/results/pyrefly/generics_typevartuple_basic.toml b/conformance/results/pyrefly/generics_typevartuple_basic.toml index 960c490d..84d1f31a 100644 --- a/conformance/results/pyrefly/generics_typevartuple_basic.toml +++ b/conformance/results/pyrefly/generics_typevartuple_basic.toml @@ -7,20 +7,20 @@ errors_diff = """ Line 85: Unexpected errors ['Argument `tuple[float]` is not assignable to parameter `arg2` with type `tuple[int]` in function `func2` [bad-argument-type]'] """ output = """ -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_typevartuple_basic.py:42:34-43: Argument `Height` is not assignable to parameter `shape` with type `tuple[Height, Width]` in function `Array.__init__` [bad-argument-type] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_typevartuple_basic.py:43:41-61: Argument `tuple[Batch, Width]` is not assignable to parameter `shape` with type `tuple[Batch, Height, Width]` in function `Array.__init__` [bad-argument-type] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_typevartuple_basic.py:45:5-45: Argument `tuple[Time, Batch, Width, Height]` is not assignable to parameter `shape` with type `tuple[Time, Batch, Height, Width]` in function `Array.__init__` [bad-argument-type] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_typevartuple_basic.py:52:22-27: `TypeVarTuple` must be unpacked [invalid-annotation] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_typevartuple_basic.py:53:37-42: `TypeVarTuple` must be unpacked [invalid-type-var-tuple] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_typevartuple_basic.py:56:34-39: `TypeVarTuple` must be unpacked [invalid-type-var-tuple] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_typevartuple_basic.py:59:24-29: `TypeVarTuple` must be unpacked [invalid-annotation] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_typevartuple_basic.py:65:27-41: Unexpected keyword argument `covariant` to TypeVarTuple [invalid-type-var-tuple] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_typevartuple_basic.py:66:27-30: Unexpected positional argument to TypeVarTuple [invalid-type-var-tuple] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_typevartuple_basic.py:67:27-36: Unexpected keyword argument `bound` to TypeVarTuple [invalid-type-var-tuple] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_typevartuple_basic.py:85:13-19: Argument `tuple[float]` is not assignable to parameter `arg2` with type `tuple[int]` in function `func2` [bad-argument-type] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_typevartuple_basic.py:89:13-19: Argument `tuple[Literal['0']]` is not assignable to parameter `arg2` with type `tuple[int]` in function `func2` [bad-argument-type] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_typevartuple_basic.py:90:15-19: Argument `tuple[Literal[0]]` is not assignable to parameter `arg2` with type `tuple[int, int]` in function `func2` [bad-argument-type] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_typevartuple_basic.py:99:17-18: Argument `Array[Width]` is not assignable to parameter `y` with type `Array[Height]` in function `multiply` [bad-argument-type] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_typevartuple_basic.py:100:17-18: Argument `Array[Height, Width]` is not assignable to parameter `y` with type `Array[Height]` in function `multiply` [bad-argument-type] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_typevartuple_basic.py:106:7-13: Type parameters for class may not have more than one TypeVarTuple [invalid-type-var-tuple] +ERROR generics_typevartuple_basic.py:42:34-43: Argument `Height` is not assignable to parameter `shape` with type `tuple[Height, Width]` in function `Array.__init__` [bad-argument-type] +ERROR generics_typevartuple_basic.py:43:41-61: Argument `tuple[Batch, Width]` is not assignable to parameter `shape` with type `tuple[Batch, Height, Width]` in function `Array.__init__` [bad-argument-type] +ERROR generics_typevartuple_basic.py:45:5-45: Argument `tuple[Time, Batch, Width, Height]` is not assignable to parameter `shape` with type `tuple[Time, Batch, Height, Width]` in function `Array.__init__` [bad-argument-type] +ERROR generics_typevartuple_basic.py:52:22-27: `TypeVarTuple` must be unpacked [invalid-annotation] +ERROR generics_typevartuple_basic.py:53:37-42: `TypeVarTuple` must be unpacked [invalid-type-var-tuple] +ERROR generics_typevartuple_basic.py:56:34-39: `TypeVarTuple` must be unpacked [invalid-type-var-tuple] +ERROR generics_typevartuple_basic.py:59:24-29: `TypeVarTuple` must be unpacked [invalid-annotation] +ERROR generics_typevartuple_basic.py:65:27-41: Unexpected keyword argument `covariant` to TypeVarTuple [invalid-type-var-tuple] +ERROR generics_typevartuple_basic.py:66:27-30: Unexpected positional argument to TypeVarTuple [invalid-type-var-tuple] +ERROR generics_typevartuple_basic.py:67:27-36: Unexpected keyword argument `bound` to TypeVarTuple [invalid-type-var-tuple] +ERROR generics_typevartuple_basic.py:85:13-19: Argument `tuple[float]` is not assignable to parameter `arg2` with type `tuple[int]` in function `func2` [bad-argument-type] +ERROR generics_typevartuple_basic.py:89:13-19: Argument `tuple[Literal['0']]` is not assignable to parameter `arg2` with type `tuple[int]` in function `func2` [bad-argument-type] +ERROR generics_typevartuple_basic.py:90:15-19: Argument `tuple[Literal[0]]` is not assignable to parameter `arg2` with type `tuple[int, int]` in function `func2` [bad-argument-type] +ERROR generics_typevartuple_basic.py:99:17-18: Argument `Array[Width]` is not assignable to parameter `y` with type `Array[Height]` in function `multiply` [bad-argument-type] +ERROR generics_typevartuple_basic.py:100:17-18: Argument `Array[Height, Width]` is not assignable to parameter `y` with type `Array[Height]` in function `multiply` [bad-argument-type] +ERROR generics_typevartuple_basic.py:106:7-13: Type parameters for class may not have more than one TypeVarTuple [invalid-type-var-tuple] """ diff --git a/conformance/results/pyrefly/generics_typevartuple_callable.toml b/conformance/results/pyrefly/generics_typevartuple_callable.toml index b97ebfe0..4c3a32c0 100644 --- a/conformance/results/pyrefly/generics_typevartuple_callable.toml +++ b/conformance/results/pyrefly/generics_typevartuple_callable.toml @@ -1,6 +1,7 @@ +conformant = "Pass" conformance_automated = "Pass" errors_diff = """ """ output = """ -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_typevartuple_callable.py:26:28-35: Argument `tuple[Literal[''], Literal[0]]` is not assignable to parameter `args` with type `tuple[int, str]` in function `Process.__init__` [bad-argument-type] +ERROR generics_typevartuple_callable.py:26:28-35: Argument `tuple[Literal[''], Literal[0]]` is not assignable to parameter `args` with type `tuple[int, str]` in function `Process.__init__` [bad-argument-type] """ diff --git a/conformance/results/pyrefly/generics_typevartuple_concat.toml b/conformance/results/pyrefly/generics_typevartuple_concat.toml index 69b21a57..042e0a2e 100644 --- a/conformance/results/pyrefly/generics_typevartuple_concat.toml +++ b/conformance/results/pyrefly/generics_typevartuple_concat.toml @@ -7,5 +7,5 @@ errors_diff = """ Line 56: Unexpected errors ['Returned type `tuple[*tuple[object | T, ...], object | T]` is not assignable to declared return type `tuple[*Ts, T]` [bad-return]'] """ output = """ -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_typevartuple_concat.py:56:12-30: Returned type `tuple[*tuple[object | T, ...], object | T]` is not assignable to declared return type `tuple[*Ts, T]` [bad-return] +ERROR generics_typevartuple_concat.py:56:12-30: Returned type `tuple[*tuple[object | T, ...], object | T]` is not assignable to declared return type `tuple[*Ts, T]` [bad-return] """ diff --git a/conformance/results/pyrefly/generics_typevartuple_overloads.toml b/conformance/results/pyrefly/generics_typevartuple_overloads.toml index cdd4d0cd..be211bd5 100644 --- a/conformance/results/pyrefly/generics_typevartuple_overloads.toml +++ b/conformance/results/pyrefly/generics_typevartuple_overloads.toml @@ -1,3 +1,4 @@ +conformant = "Pass" conformance_automated = "Pass" errors_diff = """ """ diff --git a/conformance/results/pyrefly/generics_typevartuple_specialization.toml b/conformance/results/pyrefly/generics_typevartuple_specialization.toml index 308c9009..885ec1d8 100644 --- a/conformance/results/pyrefly/generics_typevartuple_specialization.toml +++ b/conformance/results/pyrefly/generics_typevartuple_specialization.toml @@ -10,14 +10,14 @@ Line 153: Unexpected errors ['Unpacked argument cannot be used for type paramete Line 157: Unexpected errors ['assert_type(tuple[Any], tuple[*tuple[int, ...], int]) failed [assert-type]'] """ output = """ -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_typevartuple_specialization.py:51:16-31: assert_type(tuple[int, *tuple[Any, ...]], tuple[int]) failed [assert-type] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_typevartuple_specialization.py:94:16-33: assert_type(tuple[float, *tuple[Any, ...]], tuple[float]) failed [assert-type] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_typevartuple_specialization.py:109:1-21: Unpacked argument cannot be used for type parameter T [bad-unpacking] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_typevartuple_specialization.py:110:1-36: Unpacked argument cannot be used for type parameter T [bad-unpacking] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_typevartuple_specialization.py:121:26-29: Only one unbounded type is allowed to be unpacked [bad-unpacking] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_typevartuple_specialization.py:122:26-42: Only one unbounded type is allowed to be unpacked [bad-unpacking] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_typevartuple_specialization.py:127:5-13: Expected 3 type arguments for `TA7`, got 1 [bad-specialization] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_typevartuple_specialization.py:153:8-29: Unpacked argument cannot be used for type parameter T1 [bad-unpacking] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_typevartuple_specialization.py:157:16-49: assert_type(tuple[Any], tuple[*tuple[int, ...], int]) failed [assert-type] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_typevartuple_specialization.py:163:8-18: Unpacked argument cannot be used for type parameter T [bad-unpacking] +ERROR generics_typevartuple_specialization.py:51:16-31: assert_type(tuple[int, *tuple[Any, ...]], tuple[int]) failed [assert-type] +ERROR generics_typevartuple_specialization.py:94:16-33: assert_type(tuple[float, *tuple[Any, ...]], tuple[float]) failed [assert-type] +ERROR generics_typevartuple_specialization.py:109:1-21: Unpacked argument cannot be used for type parameter T [bad-unpacking] +ERROR generics_typevartuple_specialization.py:110:1-36: Unpacked argument cannot be used for type parameter T [bad-unpacking] +ERROR generics_typevartuple_specialization.py:121:26-29: Only one unbounded type is allowed to be unpacked [bad-unpacking] +ERROR generics_typevartuple_specialization.py:122:26-42: Only one unbounded type is allowed to be unpacked [bad-unpacking] +ERROR generics_typevartuple_specialization.py:127:5-13: Expected 3 type arguments for `TA7`, got 1 [bad-specialization] +ERROR generics_typevartuple_specialization.py:153:8-29: Unpacked argument cannot be used for type parameter T1 [bad-unpacking] +ERROR generics_typevartuple_specialization.py:157:16-49: assert_type(tuple[Any], tuple[*tuple[int, ...], int]) failed [assert-type] +ERROR generics_typevartuple_specialization.py:163:8-18: Unpacked argument cannot be used for type parameter T [bad-unpacking] """ diff --git a/conformance/results/pyrefly/generics_typevartuple_unpack.toml b/conformance/results/pyrefly/generics_typevartuple_unpack.toml index 08c72ff1..300385ff 100644 --- a/conformance/results/pyrefly/generics_typevartuple_unpack.toml +++ b/conformance/results/pyrefly/generics_typevartuple_unpack.toml @@ -1,6 +1,7 @@ +conformant = "Pass" conformance_automated = "Pass" errors_diff = """ """ output = """ -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_typevartuple_unpack.py:30:28-29: Argument `Array[Batch]` is not assignable to parameter `x` with type `Array[Batch, *tuple[Any, ...], Channels]` in function `process_batch_channels` [bad-argument-type] +ERROR generics_typevartuple_unpack.py:30:28-29: Argument `Array[Batch]` is not assignable to parameter `x` with type `Array[Batch, *tuple[Any, ...], Channels]` in function `process_batch_channels` [bad-argument-type] """ diff --git a/conformance/results/pyrefly/generics_upper_bound.toml b/conformance/results/pyrefly/generics_upper_bound.toml index ca961ff6..d2778f5c 100644 --- a/conformance/results/pyrefly/generics_upper_bound.toml +++ b/conformance/results/pyrefly/generics_upper_bound.toml @@ -7,8 +7,8 @@ errors_diff = """ Line 51: Expected 1 errors """ output = """ -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_upper_bound.py:24:38-45: Type variable bounds and constraints must be concrete [invalid-annotation] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_upper_bound.py:43:12-55: assert_type(list[int], list[int] | set[int]) failed [assert-type] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_upper_bound.py:43:25-31: Argument `set[int]` is not assignable to parameter `y` with type `list[int]` in function `longer` [bad-argument-type] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_upper_bound.py:56:38-49: TypeVar cannot have both constraints and bound [invalid-type-var] +ERROR generics_upper_bound.py:24:38-45: Type variable bounds and constraints must be concrete [invalid-annotation] +ERROR generics_upper_bound.py:43:12-55: assert_type(list[int], list[int] | set[int]) failed [assert-type] +ERROR generics_upper_bound.py:43:25-31: Argument `set[int]` is not assignable to parameter `y` with type `list[int]` in function `longer` [bad-argument-type] +ERROR generics_upper_bound.py:56:38-49: TypeVar cannot have both constraints and bound [invalid-type-var] """ diff --git a/conformance/results/pyrefly/generics_variance.toml b/conformance/results/pyrefly/generics_variance.toml index fd4f730c..e1eb80ee 100644 --- a/conformance/results/pyrefly/generics_variance.toml +++ b/conformance/results/pyrefly/generics_variance.toml @@ -15,5 +15,5 @@ Lines 141, 142: Expected error (tag 'CoContra_Child5') Lines 195, 196: Expected error (tag 'ContraToContraToContra_WithTA') """ output = """ -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_variance.py:14:36-54: Contradictory variance specifications [invalid-type-var] +ERROR generics_variance.py:14:36-54: Contradictory variance specifications [invalid-type-var] """ diff --git a/conformance/results/pyrefly/generics_variance_inference.toml b/conformance/results/pyrefly/generics_variance_inference.toml index 633f4053..8035068c 100644 --- a/conformance/results/pyrefly/generics_variance_inference.toml +++ b/conformance/results/pyrefly/generics_variance_inference.toml @@ -1,28 +1,29 @@ +conformant = "Pass" conformance_automated = "Pass" errors_diff = """ """ output = """ -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_variance_inference.py:24:33-35: `ClassA[float, int, int]` is not assignable to `ClassA[int, int, int]` [bad-assignment] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_variance_inference.py:25:37-39: `ClassA[float, int, int]` is not assignable to `ClassA[float, float, int]` [bad-assignment] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_variance_inference.py:28:33-35: `ClassA[int, float, float]` is not assignable to `ClassA[int, int, int]` [bad-assignment] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_variance_inference.py:41:35-62: `ShouldBeCovariant1[float]` is not assignable to `ShouldBeCovariant1[int]` [bad-assignment] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_variance_inference.py:49:35-62: `ShouldBeCovariant2[float]` is not assignable to `ShouldBeCovariant2[int]` [bad-assignment] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_variance_inference.py:58:35-62: `ShouldBeCovariant3[float]` is not assignable to `ShouldBeCovariant3[int]` [bad-assignment] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_variance_inference.py:67:34-62: `ShouldBeCovariant4[float]` is not assignable to `ShouldBeCovariant4[int]` [bad-assignment] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_variance_inference.py:80:34-62: `ShouldBeCovariant5[float]` is not assignable to `ShouldBeCovariant5[int]` [bad-assignment] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_variance_inference.py:96:38-64: `ShouldBeInvariant1[int]` is not assignable to `ShouldBeInvariant1[float]` [bad-assignment] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_variance_inference.py:97:36-66: `ShouldBeInvariant1[float]` is not assignable to `ShouldBeInvariant1[int]` [bad-assignment] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_variance_inference.py:111:38-64: `ShouldBeInvariant2[int]` is not assignable to `ShouldBeInvariant2[float]` [bad-assignment] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_variance_inference.py:112:36-66: `ShouldBeInvariant2[float]` is not assignable to `ShouldBeInvariant2[int]` [bad-assignment] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_variance_inference.py:119:43-73: `ShouldBeInvariant3[int, str]` is not assignable to `ShouldBeInvariant3[float, str]` [bad-assignment] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_variance_inference.py:120:41-73: `ShouldBeInvariant3[float, str]` is not assignable to `ShouldBeInvariant3[int, str]` [bad-assignment] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_variance_inference.py:121:43-73: `ShouldBeInvariant3[str, int]` is not assignable to `ShouldBeInvariant3[str, float]` [bad-assignment] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_variance_inference.py:122:41-73: `ShouldBeInvariant3[str, float]` is not assignable to `ShouldBeInvariant3[str, int]` [bad-assignment] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_variance_inference.py:130:38-64: `ShouldBeInvariant4[int]` is not assignable to `ShouldBeInvariant4[float]` [bad-assignment] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_variance_inference.py:138:38-64: `ShouldBeInvariant5[int]` is not assignable to `ShouldBeInvariant5[float]` [bad-assignment] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_variance_inference.py:149:45-75: `ShouldBeContravariant1[int]` is not assignable to `ShouldBeContravariant1[float]` [bad-assignment] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_variance_inference.py:169:31-58: `ShouldBeInvariant6[float]` is not assignable to `ShouldBeInvariant6[int]` [bad-assignment] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_variance_inference.py:170:33-58: `ShouldBeInvariant6[int]` is not assignable to `ShouldBeInvariant6[float]` [bad-assignment] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_variance_inference.py:181:31-58: `ShouldBeCovariant6[float]` is not assignable to `ShouldBeCovariant6[int]` [bad-assignment] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/generics_variance_inference.py:194:37-66: `ShouldBeContravariant2[int]` is not assignable to `ShouldBeContravariant2[float]` [bad-assignment] +ERROR generics_variance_inference.py:24:33-35: `ClassA[float, int, int]` is not assignable to `ClassA[int, int, int]` [bad-assignment] +ERROR generics_variance_inference.py:25:37-39: `ClassA[float, int, int]` is not assignable to `ClassA[float, float, int]` [bad-assignment] +ERROR generics_variance_inference.py:28:33-35: `ClassA[int, float, float]` is not assignable to `ClassA[int, int, int]` [bad-assignment] +ERROR generics_variance_inference.py:41:35-62: `ShouldBeCovariant1[float]` is not assignable to `ShouldBeCovariant1[int]` [bad-assignment] +ERROR generics_variance_inference.py:49:35-62: `ShouldBeCovariant2[float]` is not assignable to `ShouldBeCovariant2[int]` [bad-assignment] +ERROR generics_variance_inference.py:58:35-62: `ShouldBeCovariant3[float]` is not assignable to `ShouldBeCovariant3[int]` [bad-assignment] +ERROR generics_variance_inference.py:67:34-62: `ShouldBeCovariant4[float]` is not assignable to `ShouldBeCovariant4[int]` [bad-assignment] +ERROR generics_variance_inference.py:80:34-62: `ShouldBeCovariant5[float]` is not assignable to `ShouldBeCovariant5[int]` [bad-assignment] +ERROR generics_variance_inference.py:96:38-64: `ShouldBeInvariant1[int]` is not assignable to `ShouldBeInvariant1[float]` [bad-assignment] +ERROR generics_variance_inference.py:97:36-66: `ShouldBeInvariant1[float]` is not assignable to `ShouldBeInvariant1[int]` [bad-assignment] +ERROR generics_variance_inference.py:111:38-64: `ShouldBeInvariant2[int]` is not assignable to `ShouldBeInvariant2[float]` [bad-assignment] +ERROR generics_variance_inference.py:112:36-66: `ShouldBeInvariant2[float]` is not assignable to `ShouldBeInvariant2[int]` [bad-assignment] +ERROR generics_variance_inference.py:119:43-73: `ShouldBeInvariant3[int, str]` is not assignable to `ShouldBeInvariant3[float, str]` [bad-assignment] +ERROR generics_variance_inference.py:120:41-73: `ShouldBeInvariant3[float, str]` is not assignable to `ShouldBeInvariant3[int, str]` [bad-assignment] +ERROR generics_variance_inference.py:121:43-73: `ShouldBeInvariant3[str, int]` is not assignable to `ShouldBeInvariant3[str, float]` [bad-assignment] +ERROR generics_variance_inference.py:122:41-73: `ShouldBeInvariant3[str, float]` is not assignable to `ShouldBeInvariant3[str, int]` [bad-assignment] +ERROR generics_variance_inference.py:130:38-64: `ShouldBeInvariant4[int]` is not assignable to `ShouldBeInvariant4[float]` [bad-assignment] +ERROR generics_variance_inference.py:138:38-64: `ShouldBeInvariant5[int]` is not assignable to `ShouldBeInvariant5[float]` [bad-assignment] +ERROR generics_variance_inference.py:149:45-75: `ShouldBeContravariant1[int]` is not assignable to `ShouldBeContravariant1[float]` [bad-assignment] +ERROR generics_variance_inference.py:169:31-58: `ShouldBeInvariant6[float]` is not assignable to `ShouldBeInvariant6[int]` [bad-assignment] +ERROR generics_variance_inference.py:170:33-58: `ShouldBeInvariant6[int]` is not assignable to `ShouldBeInvariant6[float]` [bad-assignment] +ERROR generics_variance_inference.py:181:31-58: `ShouldBeCovariant6[float]` is not assignable to `ShouldBeCovariant6[int]` [bad-assignment] +ERROR generics_variance_inference.py:194:37-66: `ShouldBeContravariant2[int]` is not assignable to `ShouldBeContravariant2[float]` [bad-assignment] """ diff --git a/conformance/results/pyrefly/historical_positional.toml b/conformance/results/pyrefly/historical_positional.toml index df75cc0f..f896feb2 100644 --- a/conformance/results/pyrefly/historical_positional.toml +++ b/conformance/results/pyrefly/historical_positional.toml @@ -1,9 +1,10 @@ +conformant = "Pass" conformance_automated = "Pass" errors_diff = """ """ output = """ -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/historical_positional.py:18:4-7: Expected argument `__x` to be positional in function `f1` [unexpected-keyword] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/historical_positional.py:26:16-19: Positional-only parameter `__y` cannot appear after keyword parameters [bad-function-definition] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/historical_positional.py:38:26-29: Positional-only parameter `__y` cannot appear after keyword parameters [bad-function-definition] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/historical_positional.py:43:6-9: Expected argument `__x` to be positional in function `A.m1` [unexpected-keyword] +ERROR historical_positional.py:18:4-7: Expected argument `__x` to be positional in function `f1` [unexpected-keyword] +ERROR historical_positional.py:26:16-19: Positional-only parameter `__y` cannot appear after keyword parameters [bad-function-definition] +ERROR historical_positional.py:38:26-29: Positional-only parameter `__y` cannot appear after keyword parameters [bad-function-definition] +ERROR historical_positional.py:43:6-9: Expected argument `__x` to be positional in function `A.m1` [unexpected-keyword] """ diff --git a/conformance/results/pyrefly/literals_interactions.toml b/conformance/results/pyrefly/literals_interactions.toml index 727d76a9..cc0646c6 100644 --- a/conformance/results/pyrefly/literals_interactions.toml +++ b/conformance/results/pyrefly/literals_interactions.toml @@ -8,10 +8,10 @@ Line 71: Unexpected errors ['`@` is not supported between `Matrix[Literal[2], Li Line 72: Unexpected errors ['assert_type(Matrix[Literal[2], int], Matrix[Literal[2], Literal[7]]) failed [assert-type]'] """ output = """ -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/literals_interactions.py:15:5-9: Index 5 out of range for tuple with 3 elements [index-error] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/literals_interactions.py:16:5-9: Index -5 out of range for tuple with 3 elements [index-error] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/literals_interactions.py:17:5-9: Index 4 out of range for tuple with 3 elements [index-error] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/literals_interactions.py:18:5-10: Index -4 out of range for tuple with 3 elements [index-error] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/literals_interactions.py:71:9-14: `@` is not supported between `Matrix[Literal[2], Literal[3]]` and `Matrix[Literal[3], Literal[7]]` [unsupported-operation] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/literals_interactions.py:72:16-51: assert_type(Matrix[Literal[2], int], Matrix[Literal[2], Literal[7]]) failed [assert-type] +ERROR literals_interactions.py:15:5-9: Index 5 out of range for tuple with 3 elements [index-error] +ERROR literals_interactions.py:16:5-9: Index -5 out of range for tuple with 3 elements [index-error] +ERROR literals_interactions.py:17:5-9: Index 4 out of range for tuple with 3 elements [index-error] +ERROR literals_interactions.py:18:5-10: Index -4 out of range for tuple with 3 elements [index-error] +ERROR literals_interactions.py:71:9-14: `@` is not supported between `Matrix[Literal[2], Literal[3]]` and `Matrix[Literal[3], Literal[7]]` [unsupported-operation] +ERROR literals_interactions.py:72:16-51: assert_type(Matrix[Literal[2], int], Matrix[Literal[2], Literal[7]]) failed [assert-type] """ diff --git a/conformance/results/pyrefly/literals_literalstring.toml b/conformance/results/pyrefly/literals_literalstring.toml index fe864113..1e52195a 100644 --- a/conformance/results/pyrefly/literals_literalstring.toml +++ b/conformance/results/pyrefly/literals_literalstring.toml @@ -9,14 +9,14 @@ Line 111: Unexpected errors ["assert_type(str, Literal['hello']) failed [assert- Line 116: Unexpected errors ['assert_type(str, LiteralString) failed [assert-type]'] """ output = """ -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/literals_literalstring.py:36:29-42: Invalid type inside literal, `LiteralString` [invalid-literal] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/literals_literalstring.py:37:22-35: Invalid type inside literal, `LiteralString` [invalid-literal] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/literals_literalstring.py:43:23-24: `Literal['two']` is not assignable to `Literal['']` [bad-assignment] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/literals_literalstring.py:66:25-47: `str` is not assignable to `LiteralString` [bad-assignment] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/literals_literalstring.py:74:25-26: `Literal[3]` is not assignable to `LiteralString` [bad-assignment] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/literals_literalstring.py:75:25-32: `Literal[b'test']` is not assignable to `LiteralString` [bad-assignment] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/literals_literalstring.py:111:16-37: assert_type(str, Literal['hello']) failed [assert-type] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/literals_literalstring.py:116:16-35: assert_type(str, LiteralString) failed [assert-type] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/literals_literalstring.py:134:51-52: Argument `str` is not assignable to parameter `value` with type `LiteralString` in function `Container.__init__` [bad-argument-type] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/literals_literalstring.py:171:21-24: `list[LiteralString]` is not assignable to `list[str]` [bad-assignment] +ERROR literals_literalstring.py:36:29-42: Invalid type inside literal, `LiteralString` [invalid-literal] +ERROR literals_literalstring.py:37:22-35: Invalid type inside literal, `LiteralString` [invalid-literal] +ERROR literals_literalstring.py:43:23-24: `Literal['two']` is not assignable to `Literal['']` [bad-assignment] +ERROR literals_literalstring.py:66:25-47: `str` is not assignable to `LiteralString` [bad-assignment] +ERROR literals_literalstring.py:74:25-26: `Literal[3]` is not assignable to `LiteralString` [bad-assignment] +ERROR literals_literalstring.py:75:25-32: `Literal[b'test']` is not assignable to `LiteralString` [bad-assignment] +ERROR literals_literalstring.py:111:16-37: assert_type(str, Literal['hello']) failed [assert-type] +ERROR literals_literalstring.py:116:16-35: assert_type(str, LiteralString) failed [assert-type] +ERROR literals_literalstring.py:134:51-52: Argument `str` is not assignable to parameter `value` with type `LiteralString` in function `Container.__init__` [bad-argument-type] +ERROR literals_literalstring.py:171:21-24: `list[LiteralString]` is not assignable to `list[str]` [bad-assignment] """ diff --git a/conformance/results/pyrefly/literals_parameterizations.toml b/conformance/results/pyrefly/literals_parameterizations.toml index 2a9bce7d..e31da9df 100644 --- a/conformance/results/pyrefly/literals_parameterizations.toml +++ b/conformance/results/pyrefly/literals_parameterizations.toml @@ -1,22 +1,23 @@ +conformant = "Pass" conformance_automated = "Pass" errors_diff = """ """ output = """ -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/literals_parameterizations.py:41:15-20: Invalid literal expression [invalid-literal] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/literals_parameterizations.py:42:15-38: Invalid literal expression [invalid-literal] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/literals_parameterizations.py:43:15-21: Invalid literal expression [invalid-literal] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/literals_parameterizations.py:44:15-17: Invalid literal expression [invalid-literal] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/literals_parameterizations.py:45:15-24: Invalid literal expression [invalid-literal] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/literals_parameterizations.py:46:7-33: `Literal` arguments cannot be parenthesized [invalid-literal] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/literals_parameterizations.py:47:15-35: Invalid literal expression [invalid-literal] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/literals_parameterizations.py:48:15-18: Invalid type inside literal, `int` [invalid-literal] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/literals_parameterizations.py:49:15-23: Expected a type form, got instance of `Literal[3]` [not-a-type] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/literals_parameterizations.py:50:16-17: Invalid type inside literal, `TypeVar[T]` [invalid-literal] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/literals_parameterizations.py:51:16-20: Invalid literal expression [invalid-literal] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/literals_parameterizations.py:52:16-19: Invalid type inside literal, `Any` [invalid-literal] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/literals_parameterizations.py:53:16-19: Invalid literal expression [invalid-literal] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/literals_parameterizations.py:56:28-33: Invalid literal expression [invalid-literal] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/literals_parameterizations.py:60:4-11: Expected a type argument for `Literal` [invalid-annotation] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/literals_parameterizations.py:61:12-23: Expected a type form, got instance of `(x: Unknown) -> int` [not-a-type] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/literals_parameterizations.py:65:32-33: `Literal[Color.RED]` is not assignable to `Literal['Color.RED']` [bad-assignment] +ERROR literals_parameterizations.py:41:15-20: Invalid literal expression [invalid-literal] +ERROR literals_parameterizations.py:42:15-38: Invalid literal expression [invalid-literal] +ERROR literals_parameterizations.py:43:15-21: Invalid literal expression [invalid-literal] +ERROR literals_parameterizations.py:44:15-17: Invalid literal expression [invalid-literal] +ERROR literals_parameterizations.py:45:15-24: Invalid literal expression [invalid-literal] +ERROR literals_parameterizations.py:46:7-33: `Literal` arguments cannot be parenthesized [invalid-literal] +ERROR literals_parameterizations.py:47:15-35: Invalid literal expression [invalid-literal] +ERROR literals_parameterizations.py:48:15-18: Invalid type inside literal, `int` [invalid-literal] +ERROR literals_parameterizations.py:49:15-23: Expected a type form, got instance of `Literal[3]` [not-a-type] +ERROR literals_parameterizations.py:50:16-17: Invalid type inside literal, `TypeVar[T]` [invalid-literal] +ERROR literals_parameterizations.py:51:16-20: Invalid literal expression [invalid-literal] +ERROR literals_parameterizations.py:52:16-19: Invalid type inside literal, `Any` [invalid-literal] +ERROR literals_parameterizations.py:53:16-19: Invalid literal expression [invalid-literal] +ERROR literals_parameterizations.py:56:28-33: Invalid literal expression [invalid-literal] +ERROR literals_parameterizations.py:60:4-11: Expected a type argument for `Literal` [invalid-annotation] +ERROR literals_parameterizations.py:61:12-23: Expected a type form, got instance of `(x: Unknown) -> int` [not-a-type] +ERROR literals_parameterizations.py:65:32-33: `Literal[Color.RED]` is not assignable to `Literal['Color.RED']` [bad-assignment] """ diff --git a/conformance/results/pyrefly/literals_semantics.toml b/conformance/results/pyrefly/literals_semantics.toml index 131f0382..4fdd8dfe 100644 --- a/conformance/results/pyrefly/literals_semantics.toml +++ b/conformance/results/pyrefly/literals_semantics.toml @@ -1,9 +1,10 @@ +conformant = "Pass" conformance_automated = "Pass" errors_diff = """ """ output = """ -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/literals_semantics.py:10:18-19: `Literal[4]` is not assignable to `Literal[3]` [bad-assignment] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/literals_semantics.py:24:26-27: `Literal[0]` is not assignable to `Literal[False]` [bad-assignment] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/literals_semantics.py:25:22-23: `Literal[False]` is not assignable to `Literal[0]` [bad-assignment] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/literals_semantics.py:33:5-11: Augmented assignment produces a value of type `int`, which is not assignable to `Literal[3, 4, 5]` [bad-assignment] +ERROR literals_semantics.py:10:18-19: `Literal[4]` is not assignable to `Literal[3]` [bad-assignment] +ERROR literals_semantics.py:24:26-27: `Literal[0]` is not assignable to `Literal[False]` [bad-assignment] +ERROR literals_semantics.py:25:22-23: `Literal[False]` is not assignable to `Literal[0]` [bad-assignment] +ERROR literals_semantics.py:33:5-11: Augmented assignment produces a value of type `int`, which is not assignable to `Literal[3, 4, 5]` [bad-assignment] """ diff --git a/conformance/results/pyrefly/namedtuples_define_class.toml b/conformance/results/pyrefly/namedtuples_define_class.toml index 2d79143f..fd191957 100644 --- a/conformance/results/pyrefly/namedtuples_define_class.toml +++ b/conformance/results/pyrefly/namedtuples_define_class.toml @@ -1,17 +1,18 @@ +conformant = "Pass" conformance_automated = "Pass" errors_diff = """ """ output = """ -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/namedtuples_define_class.py:32:7-12: Index 3 out of range for tuple with 3 elements [index-error] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/namedtuples_define_class.py:33:7-13: Index -4 out of range for tuple with 3 elements [index-error] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/namedtuples_define_class.py:44:11-14: Missing argument `y` in function `Point.__new__` [missing-argument] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/namedtuples_define_class.py:45:11-16: Missing argument `y` in function `Point.__new__` [missing-argument] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/namedtuples_define_class.py:46:15-17: Argument `Literal['']` is not assignable to parameter `y` with type `int` in function `Point.__new__` [bad-argument-type] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/namedtuples_define_class.py:47:24-25: Argument `Literal[3]` is not assignable to parameter `units` with type `str` in function `Point.__new__` [bad-argument-type] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/namedtuples_define_class.py:48:22-24: Expected 3 positional arguments, got 4 in function `Point.__new__` [bad-argument-count] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/namedtuples_define_class.py:49:23-28: Unexpected keyword argument `other` in function `Point.__new__` [unexpected-keyword] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/namedtuples_define_class.py:59:5-13: NamedTuple field 'latitude' without a default may not follow NamedTuple field with a default [bad-class-definition] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/namedtuples_define_class.py:79:5-6: Cannot override named tuple element `x` [bad-override] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/namedtuples_define_class.py:98:19-22: Argument `float` is not assignable to parameter `value` with type `str` in function `Property.__new__` [bad-argument-type] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/namedtuples_define_class.py:105:7-11: Named tuples do not support multiple inheritance [invalid-inheritance] +ERROR namedtuples_define_class.py:32:7-12: Index 3 out of range for tuple with 3 elements [index-error] +ERROR namedtuples_define_class.py:33:7-13: Index -4 out of range for tuple with 3 elements [index-error] +ERROR namedtuples_define_class.py:44:11-14: Missing argument `y` in function `Point.__new__` [missing-argument] +ERROR namedtuples_define_class.py:45:11-16: Missing argument `y` in function `Point.__new__` [missing-argument] +ERROR namedtuples_define_class.py:46:15-17: Argument `Literal['']` is not assignable to parameter `y` with type `int` in function `Point.__new__` [bad-argument-type] +ERROR namedtuples_define_class.py:47:24-25: Argument `Literal[3]` is not assignable to parameter `units` with type `str` in function `Point.__new__` [bad-argument-type] +ERROR namedtuples_define_class.py:48:22-24: Expected 3 positional arguments, got 4 in function `Point.__new__` [bad-argument-count] +ERROR namedtuples_define_class.py:49:23-28: Unexpected keyword argument `other` in function `Point.__new__` [unexpected-keyword] +ERROR namedtuples_define_class.py:59:5-13: NamedTuple field 'latitude' without a default may not follow NamedTuple field with a default [bad-class-definition] +ERROR namedtuples_define_class.py:79:5-6: Cannot override named tuple element `x` [bad-override] +ERROR namedtuples_define_class.py:98:19-22: Argument `float` is not assignable to parameter `value` with type `str` in function `Property.__new__` [bad-argument-type] +ERROR namedtuples_define_class.py:105:7-11: Named tuples do not support multiple inheritance [invalid-inheritance] """ diff --git a/conformance/results/pyrefly/namedtuples_define_functional.toml b/conformance/results/pyrefly/namedtuples_define_functional.toml index 3b25b449..35a38690 100644 --- a/conformance/results/pyrefly/namedtuples_define_functional.toml +++ b/conformance/results/pyrefly/namedtuples_define_functional.toml @@ -1,19 +1,20 @@ +conformant = "Pass" conformance_automated = "Pass" errors_diff = """ """ output = """ -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/namedtuples_define_functional.py:16:14-19: Missing argument `y` in function `Point1.__new__` [missing-argument] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/namedtuples_define_functional.py:21:14-16: Missing argument `x` in function `Point2.__new__` [missing-argument] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/namedtuples_define_functional.py:21:14-16: Missing argument `y` in function `Point2.__new__` [missing-argument] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/namedtuples_define_functional.py:26:21-22: Expected 2 positional arguments, got 3 in function `Point3.__new__` [bad-argument-count] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/namedtuples_define_functional.py:31:14-22: Missing argument `y` in function `Point4.__new__` [missing-argument] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/namedtuples_define_functional.py:31:18-19: Unexpected keyword argument `z` in function `Point4.__new__` [unexpected-keyword] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/namedtuples_define_functional.py:36:18-21: Argument `Literal['1']` is not assignable to parameter `y` with type `int` in function `Point5.__new__` [bad-argument-type] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/namedtuples_define_functional.py:37:21-22: Expected 2 positional arguments, got 3 in function `Point5.__new__` [bad-argument-count] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/namedtuples_define_functional.py:42:18-21: Argument `Literal['1']` is not assignable to parameter `y` with type `int` in function `Point6.__new__` [bad-argument-type] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/namedtuples_define_functional.py:43:17-20: Argument `float` is not assignable to parameter `x` with type `int` in function `Point6.__new__` [bad-argument-type] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/namedtuples_define_functional.py:52:31-34: Duplicate field `a` [bad-class-definition] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/namedtuples_define_functional.py:53:33-38: `def` is not a valid identifier [bad-class-definition] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/namedtuples_define_functional.py:54:33-38: `def` is not a valid identifier [bad-class-definition] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/namedtuples_define_functional.py:66:4-6: Missing argument `a` in function `NT5.__new__` [missing-argument] +ERROR namedtuples_define_functional.py:16:14-19: Missing argument `y` in function `Point1.__new__` [missing-argument] +ERROR namedtuples_define_functional.py:21:14-16: Missing argument `x` in function `Point2.__new__` [missing-argument] +ERROR namedtuples_define_functional.py:21:14-16: Missing argument `y` in function `Point2.__new__` [missing-argument] +ERROR namedtuples_define_functional.py:26:21-22: Expected 2 positional arguments, got 3 in function `Point3.__new__` [bad-argument-count] +ERROR namedtuples_define_functional.py:31:14-22: Missing argument `y` in function `Point4.__new__` [missing-argument] +ERROR namedtuples_define_functional.py:31:18-19: Unexpected keyword argument `z` in function `Point4.__new__` [unexpected-keyword] +ERROR namedtuples_define_functional.py:36:18-21: Argument `Literal['1']` is not assignable to parameter `y` with type `int` in function `Point5.__new__` [bad-argument-type] +ERROR namedtuples_define_functional.py:37:21-22: Expected 2 positional arguments, got 3 in function `Point5.__new__` [bad-argument-count] +ERROR namedtuples_define_functional.py:42:18-21: Argument `Literal['1']` is not assignable to parameter `y` with type `int` in function `Point6.__new__` [bad-argument-type] +ERROR namedtuples_define_functional.py:43:17-20: Argument `float` is not assignable to parameter `x` with type `int` in function `Point6.__new__` [bad-argument-type] +ERROR namedtuples_define_functional.py:52:31-34: Duplicate field `a` [bad-class-definition] +ERROR namedtuples_define_functional.py:53:33-38: `def` is not a valid identifier [bad-class-definition] +ERROR namedtuples_define_functional.py:54:33-38: `def` is not a valid identifier [bad-class-definition] +ERROR namedtuples_define_functional.py:66:4-6: Missing argument `a` in function `NT5.__new__` [missing-argument] """ diff --git a/conformance/results/pyrefly/namedtuples_type_compat.toml b/conformance/results/pyrefly/namedtuples_type_compat.toml index 1492f454..83282a96 100644 --- a/conformance/results/pyrefly/namedtuples_type_compat.toml +++ b/conformance/results/pyrefly/namedtuples_type_compat.toml @@ -1,7 +1,8 @@ +conformant = "Pass" conformance_automated = "Pass" errors_diff = """ """ output = """ -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/namedtuples_type_compat.py:22:23-24: `Point` is not assignable to `tuple[int, int]` [bad-assignment] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/namedtuples_type_compat.py:23:28-29: `Point` is not assignable to `tuple[int, str, str]` [bad-assignment] +ERROR namedtuples_type_compat.py:22:23-24: `Point` is not assignable to `tuple[int, int]` [bad-assignment] +ERROR namedtuples_type_compat.py:23:28-29: `Point` is not assignable to `tuple[int, str, str]` [bad-assignment] """ diff --git a/conformance/results/pyrefly/namedtuples_usage.toml b/conformance/results/pyrefly/namedtuples_usage.toml index 46a3ae9b..fe89094a 100644 --- a/conformance/results/pyrefly/namedtuples_usage.toml +++ b/conformance/results/pyrefly/namedtuples_usage.toml @@ -1,13 +1,14 @@ +conformant = "Pass" conformance_automated = "Pass" errors_diff = """ """ output = """ -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/namedtuples_usage.py:34:7-11: Index 3 out of range for tuple with 3 elements [index-error] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/namedtuples_usage.py:35:7-12: Index -4 out of range for tuple with 3 elements [index-error] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/namedtuples_usage.py:40:1-4: Cannot set field `x` [read-only] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/namedtuples_usage.py:41:1-5: Cannot set item in `Point` [unsupported-operation] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/namedtuples_usage.py:42:5-8: Cannot delete field `x` [read-only] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/namedtuples_usage.py:43:5-9: Cannot delete item in `Point` [unsupported-operation] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/namedtuples_usage.py:52:1-7: Cannot unpack Point (of size 3) into 2 values [bad-unpacking] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/namedtuples_usage.py:53:1-21: Cannot unpack Point (of size 3) into 4 values [bad-unpacking] +ERROR namedtuples_usage.py:34:7-11: Index 3 out of range for tuple with 3 elements [index-error] +ERROR namedtuples_usage.py:35:7-12: Index -4 out of range for tuple with 3 elements [index-error] +ERROR namedtuples_usage.py:40:1-4: Cannot set field `x` [read-only] +ERROR namedtuples_usage.py:41:1-5: Cannot set item in `Point` [unsupported-operation] +ERROR namedtuples_usage.py:42:5-8: Cannot delete field `x` [read-only] +ERROR namedtuples_usage.py:43:5-9: Cannot delete item in `Point` [unsupported-operation] +ERROR namedtuples_usage.py:52:1-7: Cannot unpack Point (of size 3) into 2 values [bad-unpacking] +ERROR namedtuples_usage.py:53:1-21: Cannot unpack Point (of size 3) into 4 values [bad-unpacking] """ diff --git a/conformance/results/pyrefly/narrowing_typeguard.toml b/conformance/results/pyrefly/narrowing_typeguard.toml index 3b09d650..be07b900 100644 --- a/conformance/results/pyrefly/narrowing_typeguard.toml +++ b/conformance/results/pyrefly/narrowing_typeguard.toml @@ -1,9 +1,10 @@ +conformant = "Pass" conformance_automated = "Pass" errors_diff = """ """ output = """ -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/narrowing_typeguard.py:102:9-13: Type guard functions must accept at least one positional argument [bad-function-definition] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/narrowing_typeguard.py:107:9-13: Type guard functions must accept at least one positional argument [bad-function-definition] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/narrowing_typeguard.py:128:20-36: Argument `(val: object) -> TypeGuard[int]` is not assignable to parameter `f` with type `(object) -> str` in function `takes_callable_str` [bad-argument-type] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/narrowing_typeguard.py:148:26-42: Argument `(val: object) -> TypeGuard[int]` is not assignable to parameter `f` with type `CallableStrProto` in function `takes_callable_str_proto` [bad-argument-type] +ERROR narrowing_typeguard.py:102:9-13: Type guard functions must accept at least one positional argument [bad-function-definition] +ERROR narrowing_typeguard.py:107:9-13: Type guard functions must accept at least one positional argument [bad-function-definition] +ERROR narrowing_typeguard.py:128:20-36: Argument `(val: object) -> TypeGuard[int]` is not assignable to parameter `f` with type `(object) -> str` in function `takes_callable_str` [bad-argument-type] +ERROR narrowing_typeguard.py:148:26-42: Argument `(val: object) -> TypeGuard[int]` is not assignable to parameter `f` with type `CallableStrProto` in function `takes_callable_str_proto` [bad-argument-type] """ diff --git a/conformance/results/pyrefly/narrowing_typeis.toml b/conformance/results/pyrefly/narrowing_typeis.toml index f4b482bc..8ebf9e4a 100644 --- a/conformance/results/pyrefly/narrowing_typeis.toml +++ b/conformance/results/pyrefly/narrowing_typeis.toml @@ -1,14 +1,15 @@ +conformant = "Pass" conformance_automated = "Pass" errors_diff = """ """ output = """ -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/narrowing_typeis.py:105:9-13: Type guard functions must accept at least one positional argument [bad-function-definition] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/narrowing_typeis.py:110:9-13: Type guard functions must accept at least one positional argument [bad-function-definition] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/narrowing_typeis.py:132:20-36: Argument `(val: object) -> TypeIs[int]` is not assignable to parameter `f` with type `(object) -> str` in function `takes_callable_str` [bad-argument-type] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/narrowing_typeis.py:152:26-42: Argument `(val: object) -> TypeIs[int]` is not assignable to parameter `f` with type `CallableStrProto` in function `takes_callable_str_proto` [bad-argument-type] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/narrowing_typeis.py:169:17-30: Argument `(val: object) -> TypeIs[int]` is not assignable to parameter `f` with type `(object) -> TypeGuard[int]` in function `takes_typeguard` [bad-argument-type] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/narrowing_typeis.py:170:14-30: Argument `(val: object) -> TypeGuard[int]` is not assignable to parameter `f` with type `(object) -> TypeIs[int]` in function `takes_typeis` [bad-argument-type] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/narrowing_typeis.py:191:18-29: Argument `(val: object) -> TypeIs[bool]` is not assignable to parameter `f` with type `(object) -> TypeIs[int]` in function `takes_int_typeis` [bad-argument-type] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/narrowing_typeis.py:195:5-15: Return type `str` must be assignable to the first argument type `int` [bad-function-definition] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/narrowing_typeis.py:199:5-24: Return type `list[int]` must be assignable to the first argument type `list[object]` [bad-function-definition] +ERROR narrowing_typeis.py:105:9-13: Type guard functions must accept at least one positional argument [bad-function-definition] +ERROR narrowing_typeis.py:110:9-13: Type guard functions must accept at least one positional argument [bad-function-definition] +ERROR narrowing_typeis.py:132:20-36: Argument `(val: object) -> TypeIs[int]` is not assignable to parameter `f` with type `(object) -> str` in function `takes_callable_str` [bad-argument-type] +ERROR narrowing_typeis.py:152:26-42: Argument `(val: object) -> TypeIs[int]` is not assignable to parameter `f` with type `CallableStrProto` in function `takes_callable_str_proto` [bad-argument-type] +ERROR narrowing_typeis.py:169:17-30: Argument `(val: object) -> TypeIs[int]` is not assignable to parameter `f` with type `(object) -> TypeGuard[int]` in function `takes_typeguard` [bad-argument-type] +ERROR narrowing_typeis.py:170:14-30: Argument `(val: object) -> TypeGuard[int]` is not assignable to parameter `f` with type `(object) -> TypeIs[int]` in function `takes_typeis` [bad-argument-type] +ERROR narrowing_typeis.py:191:18-29: Argument `(val: object) -> TypeIs[bool]` is not assignable to parameter `f` with type `(object) -> TypeIs[int]` in function `takes_int_typeis` [bad-argument-type] +ERROR narrowing_typeis.py:195:5-15: Return type `str` must be assignable to the first argument type `int` [bad-function-definition] +ERROR narrowing_typeis.py:199:5-24: Return type `list[int]` must be assignable to the first argument type `list[object]` [bad-function-definition] """ diff --git a/conformance/results/pyrefly/overloads_basic.toml b/conformance/results/pyrefly/overloads_basic.toml index 9159cf6b..315a20e4 100644 --- a/conformance/results/pyrefly/overloads_basic.toml +++ b/conformance/results/pyrefly/overloads_basic.toml @@ -1,6 +1,7 @@ +conformant = "Pass" conformance_automated = "Pass" errors_diff = """ """ output = """ -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/overloads_basic.py:39:1-6: Cannot index into `Bytes` [index-error] +ERROR overloads_basic.py:39:1-6: Cannot index into `Bytes` [index-error] """ diff --git a/conformance/results/pyrefly/overloads_consistency.toml b/conformance/results/pyrefly/overloads_consistency.toml index 89ee7530..c7e56282 100644 --- a/conformance/results/pyrefly/overloads_consistency.toml +++ b/conformance/results/pyrefly/overloads_consistency.toml @@ -1,7 +1,8 @@ +conformant = "Pass" conformance_automated = "Pass" errors_diff = """ """ output = """ -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/overloads_consistency.py:25:5-16: Overload return type `str` is not assignable to implementation return type `int` [invalid-overload] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/overloads_consistency.py:41:5-19: Implementation signature `(x: int) -> int | str` does not accept all arguments that overload signature `(x: str) -> str` accepts [invalid-overload] +ERROR overloads_consistency.py:25:5-16: Overload return type `str` is not assignable to implementation return type `int` [invalid-overload] +ERROR overloads_consistency.py:41:5-19: Implementation signature `(x: int) -> int | str` does not accept all arguments that overload signature `(x: str) -> str` accepts [invalid-overload] """ diff --git a/conformance/results/pyrefly/overloads_definitions.toml b/conformance/results/pyrefly/overloads_definitions.toml index 76c89654..ab58e4fb 100644 --- a/conformance/results/pyrefly/overloads_definitions.toml +++ b/conformance/results/pyrefly/overloads_definitions.toml @@ -14,11 +14,11 @@ Line 49: Unexpected errors ['Overloaded function must have an implementation [in Line 176: Unexpected errors ['`final_method` is declared as final in parent class `Base` [bad-override]'] """ output = """ -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/overloads_definitions.py:16:5-10: Overloaded function needs at least two @overload declarations [invalid-overload] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/overloads_definitions.py:28:5-10: Overloaded function must have an implementation [invalid-overload] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/overloads_definitions.py:49:9-14: Overloaded function must have an implementation [invalid-overload] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/overloads_definitions.py:59:9-21: Overloaded function must have an implementation [invalid-overload] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/overloads_definitions.py:90:9-14: Implementation signature `(cls: type[Self@C], *args: int | str) -> int | str` does not accept all arguments that overload signature `(self: Self@C, x: str, /) -> str` accepts [invalid-overload] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/overloads_definitions.py:176:9-21: `final_method` is declared as final in parent class `Base` [bad-override] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/overloads_definitions.py:191:9-21: Class member `Child.bad_override` is marked as an override, but no parent class has a matching attribute [bad-override] +ERROR overloads_definitions.py:16:5-10: Overloaded function needs at least two @overload declarations [invalid-overload] +ERROR overloads_definitions.py:28:5-10: Overloaded function must have an implementation [invalid-overload] +ERROR overloads_definitions.py:49:9-14: Overloaded function must have an implementation [invalid-overload] +ERROR overloads_definitions.py:59:9-21: Overloaded function must have an implementation [invalid-overload] +ERROR overloads_definitions.py:90:9-14: Implementation signature `(cls: type[Self@C], *args: int | str) -> int | str` does not accept all arguments that overload signature `(self: Self@C, x: str, /) -> str` accepts [invalid-overload] +ERROR overloads_definitions.py:176:9-21: `final_method` is declared as final in parent class `Base` [bad-override] +ERROR overloads_definitions.py:191:9-21: Class member `Child.bad_override` is marked as an override, but no parent class has a matching attribute [bad-override] """ diff --git a/conformance/results/pyrefly/overloads_definitions_stub.toml b/conformance/results/pyrefly/overloads_definitions_stub.toml index c92e574e..18ba0b31 100644 --- a/conformance/results/pyrefly/overloads_definitions_stub.toml +++ b/conformance/results/pyrefly/overloads_definitions_stub.toml @@ -12,7 +12,7 @@ Lines 80, 82, 84, 85, 86: Expected error (tag 'invalid_final_2') Lines 143, 146, 147, 149: Expected error (tag 'override_impl') """ output = """ -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/overloads_definitions_stub.pyi:14:5-10: Overloaded function needs at least two @overload declarations [invalid-overload] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/overloads_definitions_stub.pyi:108:9-21: `final_method` is declared as final in parent class `Base` [bad-override] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/overloads_definitions_stub.pyi:122:9-21: Class member `Child.bad_override` is marked as an override, but no parent class has a matching attribute [bad-override] +ERROR overloads_definitions_stub.pyi:14:5-10: Overloaded function needs at least two @overload declarations [invalid-overload] +ERROR overloads_definitions_stub.pyi:108:9-21: `final_method` is declared as final in parent class `Base` [bad-override] +ERROR overloads_definitions_stub.pyi:122:9-21: Class member `Child.bad_override` is marked as an override, but no parent class has a matching attribute [bad-override] """ diff --git a/conformance/results/pyrefly/overloads_evaluation.toml b/conformance/results/pyrefly/overloads_evaluation.toml index 227200a2..70360bd2 100644 --- a/conformance/results/pyrefly/overloads_evaluation.toml +++ b/conformance/results/pyrefly/overloads_evaluation.toml @@ -21,22 +21,22 @@ Line 280: Unexpected errors ['assert_type(list[int], Any) failed [assert-type]'] Line 345: Unexpected errors ['assert_type(list[int], Any) failed [assert-type]'] """ output = """ -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/overloads_evaluation.py:38:11-13: No matching overload found for function `example1_1` [no-matching-overload] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/overloads_evaluation.py:46:11-17: No matching overload found for function `example1_1` [no-matching-overload] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/overloads_evaluation.py:51:11-14: No matching overload found for function `example1_1` [no-matching-overload] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/overloads_evaluation.py:105:20-29: No matching overload found for function `example2` [no-matching-overload] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/overloads_evaluation.py:106:16-33: assert_type(Any, int | str) failed [assert-type] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/overloads_evaluation.py:115:13-22: No matching overload found for function `example2` [no-matching-overload] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/overloads_evaluation.py:134:23-26: No matching overload found for function `expand_bool` [no-matching-overload] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/overloads_evaluation.py:135:16-37: assert_type(Any, Literal[0, 1]) failed [assert-type] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/overloads_evaluation.py:160:23-26: No matching overload found for function `expand_enum` [no-matching-overload] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/overloads_evaluation.py:161:16-37: assert_type(Any, Literal[0, 1]) failed [assert-type] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/overloads_evaluation.py:180:29-32: No matching overload found for function `expand_type_union` [no-matching-overload] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/overloads_evaluation.py:181:16-33: assert_type(Any, int | str) failed [assert-type] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/overloads_evaluation.py:204:24-32: No matching overload found for function `expand_tuple` [no-matching-overload] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/overloads_evaluation.py:205:16-33: assert_type(Any, int | str) failed [assert-type] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/overloads_evaluation.py:234:16-27: assert_type(str, int) failed [assert-type] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/overloads_evaluation.py:264:16-27: assert_type(list[int], Any) failed [assert-type] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/overloads_evaluation.py:280:16-34: assert_type(list[int], Any) failed [assert-type] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/overloads_evaluation.py:345:16-27: assert_type(list[int], Any) failed [assert-type] +ERROR overloads_evaluation.py:38:11-13: No matching overload found for function `example1_1` [no-matching-overload] +ERROR overloads_evaluation.py:46:11-17: No matching overload found for function `example1_1` [no-matching-overload] +ERROR overloads_evaluation.py:51:11-14: No matching overload found for function `example1_1` [no-matching-overload] +ERROR overloads_evaluation.py:105:20-29: No matching overload found for function `example2` [no-matching-overload] +ERROR overloads_evaluation.py:106:16-33: assert_type(Any, int | str) failed [assert-type] +ERROR overloads_evaluation.py:115:13-22: No matching overload found for function `example2` [no-matching-overload] +ERROR overloads_evaluation.py:134:23-26: No matching overload found for function `expand_bool` [no-matching-overload] +ERROR overloads_evaluation.py:135:16-37: assert_type(Any, Literal[0, 1]) failed [assert-type] +ERROR overloads_evaluation.py:160:23-26: No matching overload found for function `expand_enum` [no-matching-overload] +ERROR overloads_evaluation.py:161:16-37: assert_type(Any, Literal[0, 1]) failed [assert-type] +ERROR overloads_evaluation.py:180:29-32: No matching overload found for function `expand_type_union` [no-matching-overload] +ERROR overloads_evaluation.py:181:16-33: assert_type(Any, int | str) failed [assert-type] +ERROR overloads_evaluation.py:204:24-32: No matching overload found for function `expand_tuple` [no-matching-overload] +ERROR overloads_evaluation.py:205:16-33: assert_type(Any, int | str) failed [assert-type] +ERROR overloads_evaluation.py:234:16-27: assert_type(str, int) failed [assert-type] +ERROR overloads_evaluation.py:264:16-27: assert_type(list[int], Any) failed [assert-type] +ERROR overloads_evaluation.py:280:16-34: assert_type(list[int], Any) failed [assert-type] +ERROR overloads_evaluation.py:345:16-27: assert_type(list[int], Any) failed [assert-type] """ diff --git a/conformance/results/pyrefly/protocols_class_objects.toml b/conformance/results/pyrefly/protocols_class_objects.toml index d1ba0e16..68cdca5c 100644 --- a/conformance/results/pyrefly/protocols_class_objects.toml +++ b/conformance/results/pyrefly/protocols_class_objects.toml @@ -13,7 +13,7 @@ Line 108: Expected 1 errors Line 26: Unexpected errors ['Cannot instantiate `Proto` because it is a protocol [bad-instantiation]'] """ output = """ -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/protocols_class_objects.py:26:15-17: Cannot instantiate `Proto` because it is a protocol [bad-instantiation] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/protocols_class_objects.py:58:16-25: `type[ConcreteA]` is not assignable to `ProtoA1` [bad-assignment] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/protocols_class_objects.py:74:16-25: `type[ConcreteB]` is not assignable to `ProtoB1` [bad-assignment] +ERROR protocols_class_objects.py:26:15-17: Cannot instantiate `Proto` because it is a protocol [bad-instantiation] +ERROR protocols_class_objects.py:58:16-25: `type[ConcreteA]` is not assignable to `ProtoA1` [bad-assignment] +ERROR protocols_class_objects.py:74:16-25: `type[ConcreteB]` is not assignable to `ProtoB1` [bad-assignment] """ diff --git a/conformance/results/pyrefly/protocols_definition.toml b/conformance/results/pyrefly/protocols_definition.toml index 6806f75f..294fd1c6 100644 --- a/conformance/results/pyrefly/protocols_definition.toml +++ b/conformance/results/pyrefly/protocols_definition.toml @@ -11,23 +11,23 @@ Line 117: Expected 1 errors Line 79: Unexpected errors ['`Concrete` is not assignable to `Template` [bad-assignment]'] """ output = """ -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/protocols_definition.py:30:11-14: Argument `list[int]` is not assignable to parameter `things` with type `Iterable[SupportsClose]` in function `close_all` [bad-argument-type] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/protocols_definition.py:79:17-38: `Concrete` is not assignable to `Template` [bad-assignment] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/protocols_definition.py:114:22-38: `Concrete2_Bad1` is not assignable to `Template2` [bad-assignment] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/protocols_definition.py:115:22-38: `Concrete2_Bad2` is not assignable to `Template2` [bad-assignment] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/protocols_definition.py:156:22-38: `Concrete3_Bad1` is not assignable to `Template3` [bad-assignment] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/protocols_definition.py:157:22-38: `Concrete3_Bad2` is not assignable to `Template3` [bad-assignment] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/protocols_definition.py:158:22-38: `Concrete3_Bad3` is not assignable to `Template3` [bad-assignment] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/protocols_definition.py:159:22-38: `Concrete3_Bad4` is not assignable to `Template3` [bad-assignment] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/protocols_definition.py:160:22-38: `Concrete3_Bad5` is not assignable to `Template3` [bad-assignment] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/protocols_definition.py:218:22-38: `Concrete4_Bad1` is not assignable to `Template4` [bad-assignment] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/protocols_definition.py:219:22-38: `Concrete4_Bad2` is not assignable to `Template4` [bad-assignment] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/protocols_definition.py:285:22-38: `Concrete5_Bad1` is not assignable to `Template5` [bad-assignment] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/protocols_definition.py:286:22-38: `Concrete5_Bad2` is not assignable to `Template5` [bad-assignment] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/protocols_definition.py:287:22-38: `Concrete5_Bad3` is not assignable to `Template5` [bad-assignment] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/protocols_definition.py:288:22-38: `Concrete5_Bad4` is not assignable to `Template5` [bad-assignment] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/protocols_definition.py:289:22-38: `Concrete5_Bad5` is not assignable to `Template5` [bad-assignment] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/protocols_definition.py:339:22-38: `Concrete6_Bad1` is not assignable to `Template6` [bad-assignment] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/protocols_definition.py:340:22-38: `Concrete6_Bad2` is not assignable to `Template6` [bad-assignment] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/protocols_definition.py:341:22-38: `Concrete6_Bad3` is not assignable to `Template6` [bad-assignment] +ERROR protocols_definition.py:30:11-14: Argument `list[int]` is not assignable to parameter `things` with type `Iterable[SupportsClose]` in function `close_all` [bad-argument-type] +ERROR protocols_definition.py:79:17-38: `Concrete` is not assignable to `Template` [bad-assignment] +ERROR protocols_definition.py:114:22-38: `Concrete2_Bad1` is not assignable to `Template2` [bad-assignment] +ERROR protocols_definition.py:115:22-38: `Concrete2_Bad2` is not assignable to `Template2` [bad-assignment] +ERROR protocols_definition.py:156:22-38: `Concrete3_Bad1` is not assignable to `Template3` [bad-assignment] +ERROR protocols_definition.py:157:22-38: `Concrete3_Bad2` is not assignable to `Template3` [bad-assignment] +ERROR protocols_definition.py:158:22-38: `Concrete3_Bad3` is not assignable to `Template3` [bad-assignment] +ERROR protocols_definition.py:159:22-38: `Concrete3_Bad4` is not assignable to `Template3` [bad-assignment] +ERROR protocols_definition.py:160:22-38: `Concrete3_Bad5` is not assignable to `Template3` [bad-assignment] +ERROR protocols_definition.py:218:22-38: `Concrete4_Bad1` is not assignable to `Template4` [bad-assignment] +ERROR protocols_definition.py:219:22-38: `Concrete4_Bad2` is not assignable to `Template4` [bad-assignment] +ERROR protocols_definition.py:285:22-38: `Concrete5_Bad1` is not assignable to `Template5` [bad-assignment] +ERROR protocols_definition.py:286:22-38: `Concrete5_Bad2` is not assignable to `Template5` [bad-assignment] +ERROR protocols_definition.py:287:22-38: `Concrete5_Bad3` is not assignable to `Template5` [bad-assignment] +ERROR protocols_definition.py:288:22-38: `Concrete5_Bad4` is not assignable to `Template5` [bad-assignment] +ERROR protocols_definition.py:289:22-38: `Concrete5_Bad5` is not assignable to `Template5` [bad-assignment] +ERROR protocols_definition.py:339:22-38: `Concrete6_Bad1` is not assignable to `Template6` [bad-assignment] +ERROR protocols_definition.py:340:22-38: `Concrete6_Bad2` is not assignable to `Template6` [bad-assignment] +ERROR protocols_definition.py:341:22-38: `Concrete6_Bad3` is not assignable to `Template6` [bad-assignment] """ diff --git a/conformance/results/pyrefly/protocols_explicit.toml b/conformance/results/pyrefly/protocols_explicit.toml index 39f6df44..5e181591 100644 --- a/conformance/results/pyrefly/protocols_explicit.toml +++ b/conformance/results/pyrefly/protocols_explicit.toml @@ -12,5 +12,5 @@ Line 135: Expected 1 errors Line 165: Expected 1 errors """ output = """ -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/protocols_explicit.py:56:20-36: `tuple[int, int, str]` is not assignable to attribute `rgb` with type `tuple[int, int, int]` [bad-assignment] +ERROR protocols_explicit.py:56:20-36: `tuple[int, int, str]` is not assignable to attribute `rgb` with type `tuple[int, int, int]` [bad-assignment] """ diff --git a/conformance/results/pyrefly/protocols_generic.toml b/conformance/results/pyrefly/protocols_generic.toml index bc855290..908c3013 100644 --- a/conformance/results/pyrefly/protocols_generic.toml +++ b/conformance/results/pyrefly/protocols_generic.toml @@ -7,14 +7,14 @@ errors_diff = """ Line 144: Unexpected errors ['`ConcreteHasProperty1` is not assignable to `HasPropertyProto` [bad-assignment]'] """ output = """ -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/protocols_generic.py:40:24-35: `Concrete1` is not assignable to `Proto1[int, str]` [bad-assignment] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/protocols_generic.py:44:7-13: Class `Proto2` specifies type parameters in both `Generic` and `Protocol` bases [invalid-inheritance] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/protocols_generic.py:56:20-29: `Box[float]` is not assignable to `Box[int]` [bad-assignment] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/protocols_generic.py:66:25-35: `Sender[int]` is not assignable to `Sender[float]` [bad-assignment] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/protocols_generic.py:74:28-36: `AttrProto[int]` is not assignable to `AttrProto[float]` [bad-assignment] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/protocols_generic.py:75:26-36: `AttrProto[float]` is not assignable to `AttrProto[int]` [bad-assignment] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/protocols_generic.py:144:25-47: `ConcreteHasProperty1` is not assignable to `HasPropertyProto` [bad-assignment] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/protocols_generic.py:145:25-47: `ConcreteHasProperty2` is not assignable to `HasPropertyProto` [bad-assignment] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/protocols_generic.py:146:25-47: `ConcreteHasProperty3` is not assignable to `HasPropertyProto` [bad-assignment] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/protocols_generic.py:147:25-47: `ConcreteHasProperty4` is not assignable to `HasPropertyProto` [bad-assignment] +ERROR protocols_generic.py:40:24-35: `Concrete1` is not assignable to `Proto1[int, str]` [bad-assignment] +ERROR protocols_generic.py:44:7-13: Class `Proto2` specifies type parameters in both `Generic` and `Protocol` bases [invalid-inheritance] +ERROR protocols_generic.py:56:20-29: `Box[float]` is not assignable to `Box[int]` [bad-assignment] +ERROR protocols_generic.py:66:25-35: `Sender[int]` is not assignable to `Sender[float]` [bad-assignment] +ERROR protocols_generic.py:74:28-36: `AttrProto[int]` is not assignable to `AttrProto[float]` [bad-assignment] +ERROR protocols_generic.py:75:26-36: `AttrProto[float]` is not assignable to `AttrProto[int]` [bad-assignment] +ERROR protocols_generic.py:144:25-47: `ConcreteHasProperty1` is not assignable to `HasPropertyProto` [bad-assignment] +ERROR protocols_generic.py:145:25-47: `ConcreteHasProperty2` is not assignable to `HasPropertyProto` [bad-assignment] +ERROR protocols_generic.py:146:25-47: `ConcreteHasProperty3` is not assignable to `HasPropertyProto` [bad-assignment] +ERROR protocols_generic.py:147:25-47: `ConcreteHasProperty4` is not assignable to `HasPropertyProto` [bad-assignment] """ diff --git a/conformance/results/pyrefly/protocols_merging.toml b/conformance/results/pyrefly/protocols_merging.toml index d1adf677..d24c0828 100644 --- a/conformance/results/pyrefly/protocols_merging.toml +++ b/conformance/results/pyrefly/protocols_merging.toml @@ -7,9 +7,9 @@ errors_diff = """ Line 82: Expected 1 errors """ output = """ -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/protocols_merging.py:52:25-38: `SCConcrete2` is not assignable to `SizedAndClosable1` [bad-assignment] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/protocols_merging.py:53:25-38: `SCConcrete2` is not assignable to `SizedAndClosable2` [bad-assignment] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/protocols_merging.py:54:25-38: `SCConcrete2` is not assignable to `SizedAndClosable3` [bad-assignment] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/protocols_merging.py:67:16-33: If `Protocol` is included as a base class, all other bases must be protocols [invalid-inheritance] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/protocols_merging.py:83:24-37: `SCConcrete1` is not assignable to `SizedAndClosable4` [bad-assignment] +ERROR protocols_merging.py:52:25-38: `SCConcrete2` is not assignable to `SizedAndClosable1` [bad-assignment] +ERROR protocols_merging.py:53:25-38: `SCConcrete2` is not assignable to `SizedAndClosable2` [bad-assignment] +ERROR protocols_merging.py:54:25-38: `SCConcrete2` is not assignable to `SizedAndClosable3` [bad-assignment] +ERROR protocols_merging.py:67:16-33: If `Protocol` is included as a base class, all other bases must be protocols [invalid-inheritance] +ERROR protocols_merging.py:83:24-37: `SCConcrete1` is not assignable to `SizedAndClosable4` [bad-assignment] """ diff --git a/conformance/results/pyrefly/protocols_modules.toml b/conformance/results/pyrefly/protocols_modules.toml index 1e9062dd..88eae793 100644 --- a/conformance/results/pyrefly/protocols_modules.toml +++ b/conformance/results/pyrefly/protocols_modules.toml @@ -7,8 +7,8 @@ errors_diff = """ Line 25: Unexpected errors ['`Module[_protocols_modules1]` is not assignable to `Options1` [bad-assignment]'] """ output = """ -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/protocols_modules.py:25:17-36: `Module[_protocols_modules1]` is not assignable to `Options1` [bad-assignment] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/protocols_modules.py:26:17-36: `Module[_protocols_modules1]` is not assignable to `Options2` [bad-assignment] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/protocols_modules.py:48:18-37: `Module[_protocols_modules2]` is not assignable to `Reporter2` [bad-assignment] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/protocols_modules.py:49:18-37: `Module[_protocols_modules2]` is not assignable to `Reporter3` [bad-assignment] +ERROR protocols_modules.py:25:17-36: `Module[_protocols_modules1]` is not assignable to `Options1` [bad-assignment] +ERROR protocols_modules.py:26:17-36: `Module[_protocols_modules1]` is not assignable to `Options2` [bad-assignment] +ERROR protocols_modules.py:48:18-37: `Module[_protocols_modules2]` is not assignable to `Reporter2` [bad-assignment] +ERROR protocols_modules.py:49:18-37: `Module[_protocols_modules2]` is not assignable to `Reporter3` [bad-assignment] """ diff --git a/conformance/results/pyrefly/protocols_recursive.toml b/conformance/results/pyrefly/protocols_recursive.toml index cdd4d0cd..be211bd5 100644 --- a/conformance/results/pyrefly/protocols_recursive.toml +++ b/conformance/results/pyrefly/protocols_recursive.toml @@ -1,3 +1,4 @@ +conformant = "Pass" conformance_automated = "Pass" errors_diff = """ """ diff --git a/conformance/results/pyrefly/protocols_runtime_checkable.toml b/conformance/results/pyrefly/protocols_runtime_checkable.toml index 17190f8a..2566b2a4 100644 --- a/conformance/results/pyrefly/protocols_runtime_checkable.toml +++ b/conformance/results/pyrefly/protocols_runtime_checkable.toml @@ -9,7 +9,7 @@ Line 92: Expected 1 errors Line 96: Expected 1 errors """ output = """ -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/protocols_runtime_checkable.py:23:22-28: Protocol `Proto1` is not decorated with @runtime_checkable and cannot be used with isinstance() [invalid-argument] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/protocols_runtime_checkable.py:55:22-34: Protocol `DataProtocol` has non-method members and cannot be used with issubclass() [invalid-argument] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/protocols_runtime_checkable.py:61:22-53: Protocol `DataProtocol` has non-method members and cannot be used with issubclass() [invalid-argument] +ERROR protocols_runtime_checkable.py:23:22-28: Protocol `Proto1` is not decorated with @runtime_checkable and cannot be used with isinstance() [invalid-argument] +ERROR protocols_runtime_checkable.py:55:22-34: Protocol `DataProtocol` has non-method members and cannot be used with issubclass() [invalid-argument] +ERROR protocols_runtime_checkable.py:61:22-53: Protocol `DataProtocol` has non-method members and cannot be used with issubclass() [invalid-argument] """ diff --git a/conformance/results/pyrefly/protocols_self.toml b/conformance/results/pyrefly/protocols_self.toml index 75b05775..df568b19 100644 --- a/conformance/results/pyrefly/protocols_self.toml +++ b/conformance/results/pyrefly/protocols_self.toml @@ -8,6 +8,6 @@ Line 32: Unexpected errors ['`One` is not assignable to variable `c` with type ` Line 33: Unexpected errors ['`Other` is not assignable to variable `c` with type `Copyable` [bad-assignment]'] """ output = """ -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/protocols_self.py:32:5-10: `One` is not assignable to variable `c` with type `Copyable` [bad-assignment] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/protocols_self.py:33:5-12: `Other` is not assignable to variable `c` with type `Copyable` [bad-assignment] +ERROR protocols_self.py:32:5-10: `One` is not assignable to variable `c` with type `Copyable` [bad-assignment] +ERROR protocols_self.py:33:5-12: `Other` is not assignable to variable `c` with type `Copyable` [bad-assignment] """ diff --git a/conformance/results/pyrefly/protocols_subtyping.toml b/conformance/results/pyrefly/protocols_subtyping.toml index cc40f3a6..ab7a8928 100644 --- a/conformance/results/pyrefly/protocols_subtyping.toml +++ b/conformance/results/pyrefly/protocols_subtyping.toml @@ -1,12 +1,13 @@ +conformant = "Pass" conformance_automated = "Pass" errors_diff = """ """ output = """ -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/protocols_subtyping.py:16:12-14: Cannot instantiate `Proto1` because it is a protocol [bad-instantiation] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/protocols_subtyping.py:38:21-23: `Proto2` is not assignable to `Concrete2` [bad-assignment] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/protocols_subtyping.py:55:18-20: `Proto2` is not assignable to `Proto3` [bad-assignment] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/protocols_subtyping.py:79:30-36: `Proto5[int]` is not assignable to `Proto4[int, float]` [bad-assignment] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/protocols_subtyping.py:80:25-31: `Proto4[int, int]` is not assignable to `Proto5[float]` [bad-assignment] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/protocols_subtyping.py:102:30-32: `Proto6[float, float]` is not assignable to `Proto7[int, float]` [bad-assignment] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/protocols_subtyping.py:103:33-35: `Proto6[float, float]` is not assignable to `Proto7[float, object]` [bad-assignment] +ERROR protocols_subtyping.py:16:12-14: Cannot instantiate `Proto1` because it is a protocol [bad-instantiation] +ERROR protocols_subtyping.py:38:21-23: `Proto2` is not assignable to `Concrete2` [bad-assignment] +ERROR protocols_subtyping.py:55:18-20: `Proto2` is not assignable to `Proto3` [bad-assignment] +ERROR protocols_subtyping.py:79:30-36: `Proto5[int]` is not assignable to `Proto4[int, float]` [bad-assignment] +ERROR protocols_subtyping.py:80:25-31: `Proto4[int, int]` is not assignable to `Proto5[float]` [bad-assignment] +ERROR protocols_subtyping.py:102:30-32: `Proto6[float, float]` is not assignable to `Proto7[int, float]` [bad-assignment] +ERROR protocols_subtyping.py:103:33-35: `Proto6[float, float]` is not assignable to `Proto7[float, object]` [bad-assignment] """ diff --git a/conformance/results/pyrefly/qualifiers_annotated.toml b/conformance/results/pyrefly/qualifiers_annotated.toml index 21d1a357..9915217f 100644 --- a/conformance/results/pyrefly/qualifiers_annotated.toml +++ b/conformance/results/pyrefly/qualifiers_annotated.toml @@ -12,20 +12,20 @@ Line 92: Expected 1 errors Line 93: Expected 1 errors """ output = """ -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/qualifiers_annotated.py:43:17-27: list literal cannot be used in annotations [invalid-annotation] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/qualifiers_annotated.py:44:17-30: tuple literal cannot be used in annotations [invalid-annotation] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/qualifiers_annotated.py:45:17-40: list comprehension cannot be used in annotations [invalid-annotation] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/qualifiers_annotated.py:46:17-27: dict literal cannot be used in annotations [invalid-annotation] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/qualifiers_annotated.py:46:19-20: Could not find name `a` [unknown-name] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/qualifiers_annotated.py:46:24-25: Could not find name `b` [unknown-name] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/qualifiers_annotated.py:47:17-32: function call cannot be used in annotations [invalid-annotation] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/qualifiers_annotated.py:48:17-25: invalid subscript expression cannot be used in annotations [invalid-annotation] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/qualifiers_annotated.py:49:17-38: if expression cannot be used in annotations [invalid-annotation] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/qualifiers_annotated.py:50:17-21: Could not find name `var1` [unknown-name] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/qualifiers_annotated.py:51:17-21: bool literal cannot be used in annotations [invalid-annotation] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/qualifiers_annotated.py:52:18-19: number literal cannot be used in annotations [invalid-annotation] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/qualifiers_annotated.py:53:18-29: boolean operation cannot be used in annotations [invalid-annotation] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/qualifiers_annotated.py:54:18-28: f-string cannot be used in annotations [invalid-annotation] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/qualifiers_annotated.py:64:8-22: `Annotated` needs at least one piece of metadata in addition to the type [invalid-annotation] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/qualifiers_annotated.py:91:1-10: Expected a callable, got type[Annotated] [not-callable] +ERROR qualifiers_annotated.py:43:17-27: list literal cannot be used in annotations [invalid-annotation] +ERROR qualifiers_annotated.py:44:17-30: tuple literal cannot be used in annotations [invalid-annotation] +ERROR qualifiers_annotated.py:45:17-40: list comprehension cannot be used in annotations [invalid-annotation] +ERROR qualifiers_annotated.py:46:17-27: dict literal cannot be used in annotations [invalid-annotation] +ERROR qualifiers_annotated.py:46:19-20: Could not find name `a` [unknown-name] +ERROR qualifiers_annotated.py:46:24-25: Could not find name `b` [unknown-name] +ERROR qualifiers_annotated.py:47:17-32: function call cannot be used in annotations [invalid-annotation] +ERROR qualifiers_annotated.py:48:17-25: invalid subscript expression cannot be used in annotations [invalid-annotation] +ERROR qualifiers_annotated.py:49:17-38: if expression cannot be used in annotations [invalid-annotation] +ERROR qualifiers_annotated.py:50:17-21: Could not find name `var1` [unknown-name] +ERROR qualifiers_annotated.py:51:17-21: bool literal cannot be used in annotations [invalid-annotation] +ERROR qualifiers_annotated.py:52:18-19: number literal cannot be used in annotations [invalid-annotation] +ERROR qualifiers_annotated.py:53:18-29: boolean operation cannot be used in annotations [invalid-annotation] +ERROR qualifiers_annotated.py:54:18-28: f-string cannot be used in annotations [invalid-annotation] +ERROR qualifiers_annotated.py:64:8-22: `Annotated` needs at least one piece of metadata in addition to the type [invalid-annotation] +ERROR qualifiers_annotated.py:91:1-10: Expected a callable, got type[Annotated] [not-callable] """ diff --git a/conformance/results/pyrefly/qualifiers_final_annotation.toml b/conformance/results/pyrefly/qualifiers_final_annotation.toml index 977f4458..0054bf89 100644 --- a/conformance/results/pyrefly/qualifiers_final_annotation.toml +++ b/conformance/results/pyrefly/qualifiers_final_annotation.toml @@ -18,26 +18,26 @@ Line 131: Unexpected errors ['Expected first item to be a string literal [invali Line 133: Unexpected errors ['Unexpected keyword argument `x` in function `N.__new__` [unexpected-keyword]', 'Unexpected keyword argument `y` in function `N.__new__` [unexpected-keyword]'] """ output = """ -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/qualifiers_final_annotation.py:16:7-12: Expected a type argument for `Final` [invalid-annotation] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/qualifiers_final_annotation.py:18:7-22: Expected 1 type argument for `Final`, got 2 [invalid-annotation] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/qualifiers_final_annotation.py:54:9-17: Cannot set field `ID5` [read-only] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/qualifiers_final_annotation.py:65:9-17: Cannot set field `ID7` [read-only] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/qualifiers_final_annotation.py:67:9-17: Cannot set field `ID7` [read-only] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/qualifiers_final_annotation.py:71:8-11: `RATE` is marked final [bad-assignment] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/qualifiers_final_annotation.py:81:1-18: Cannot set field `DEFAULT_ID` [read-only] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/qualifiers_final_annotation.py:94:5-17: `BORDER_WIDTH` is declared as final in parent class `ClassC` [bad-override] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/qualifiers_final_annotation.py:108:19-27: `ClassVar` may not be nested inside `Final` [invalid-annotation] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/qualifiers_final_annotation.py:118:9-19: `Final` is not allowed in this context [invalid-annotation] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/qualifiers_final_annotation.py:121:14-19: `Final` is only allowed on a class or local variable annotation [invalid-annotation] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/qualifiers_final_annotation.py:121:14-30: `Final` is not allowed in this context [invalid-annotation] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/qualifiers_final_annotation.py:131:23-24: Expected first item to be a string literal [invalid-argument] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/qualifiers_final_annotation.py:131:33-34: Expected first item to be a string literal [invalid-argument] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/qualifiers_final_annotation.py:133:3-4: Unexpected keyword argument `x` in function `N.__new__` [unexpected-keyword] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/qualifiers_final_annotation.py:133:8-9: Unexpected keyword argument `y` in function `N.__new__` [unexpected-keyword] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/qualifiers_final_annotation.py:134:3-4: Unexpected keyword argument `a` in function `N.__new__` [unexpected-keyword] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/qualifiers_final_annotation.py:135:3-4: Unexpected keyword argument `x` in function `N.__new__` [unexpected-keyword] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/qualifiers_final_annotation.py:135:9-10: Unexpected keyword argument `y` in function `N.__new__` [unexpected-keyword] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/qualifiers_final_annotation.py:141:11-12: `ID1` is marked final [bad-assignment] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/qualifiers_final_annotation.py:145:5-11: Cannot assign to var x because it is marked final [bad-assignment] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/qualifiers_final_annotation.py:147:15-16: Assignment target is marked final [bad-assignment] +ERROR qualifiers_final_annotation.py:16:7-12: Expected a type argument for `Final` [invalid-annotation] +ERROR qualifiers_final_annotation.py:18:7-22: Expected 1 type argument for `Final`, got 2 [invalid-annotation] +ERROR qualifiers_final_annotation.py:54:9-17: Cannot set field `ID5` [read-only] +ERROR qualifiers_final_annotation.py:65:9-17: Cannot set field `ID7` [read-only] +ERROR qualifiers_final_annotation.py:67:9-17: Cannot set field `ID7` [read-only] +ERROR qualifiers_final_annotation.py:71:8-11: `RATE` is marked final [bad-assignment] +ERROR qualifiers_final_annotation.py:81:1-18: Cannot set field `DEFAULT_ID` [read-only] +ERROR qualifiers_final_annotation.py:94:5-17: `BORDER_WIDTH` is declared as final in parent class `ClassC` [bad-override] +ERROR qualifiers_final_annotation.py:108:19-27: `ClassVar` may not be nested inside `Final` [invalid-annotation] +ERROR qualifiers_final_annotation.py:118:9-19: `Final` is not allowed in this context [invalid-annotation] +ERROR qualifiers_final_annotation.py:121:14-19: `Final` is only allowed on a class or local variable annotation [invalid-annotation] +ERROR qualifiers_final_annotation.py:121:14-30: `Final` is not allowed in this context [invalid-annotation] +ERROR qualifiers_final_annotation.py:131:23-24: Expected first item to be a string literal [invalid-argument] +ERROR qualifiers_final_annotation.py:131:33-34: Expected first item to be a string literal [invalid-argument] +ERROR qualifiers_final_annotation.py:133:3-4: Unexpected keyword argument `x` in function `N.__new__` [unexpected-keyword] +ERROR qualifiers_final_annotation.py:133:8-9: Unexpected keyword argument `y` in function `N.__new__` [unexpected-keyword] +ERROR qualifiers_final_annotation.py:134:3-4: Unexpected keyword argument `a` in function `N.__new__` [unexpected-keyword] +ERROR qualifiers_final_annotation.py:135:3-4: Unexpected keyword argument `x` in function `N.__new__` [unexpected-keyword] +ERROR qualifiers_final_annotation.py:135:9-10: Unexpected keyword argument `y` in function `N.__new__` [unexpected-keyword] +ERROR qualifiers_final_annotation.py:141:11-12: `ID1` is marked final [bad-assignment] +ERROR qualifiers_final_annotation.py:145:5-11: Cannot assign to var x because it is marked final [bad-assignment] +ERROR qualifiers_final_annotation.py:147:15-16: Assignment target is marked final [bad-assignment] """ diff --git a/conformance/results/pyrefly/qualifiers_final_decorator.toml b/conformance/results/pyrefly/qualifiers_final_decorator.toml index 58b20a00..e4d7d3ab 100644 --- a/conformance/results/pyrefly/qualifiers_final_decorator.toml +++ b/conformance/results/pyrefly/qualifiers_final_decorator.toml @@ -7,13 +7,13 @@ errors_diff = """ Lines 84, 85, 86: Expected error (tag 'Derived3-2') """ output = """ -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/qualifiers_final_decorator.py:21:16-21: Cannot extend final class `Base1` [invalid-inheritance] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/qualifiers_final_decorator.py:56:9-16: `method1` is declared as final in parent class `Base2` [bad-override] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/qualifiers_final_decorator.py:60:9-16: `method2` is declared as final in parent class `Base2` [bad-override] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/qualifiers_final_decorator.py:64:9-16: `method3` is declared as final in parent class `Base2` [bad-override] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/qualifiers_final_decorator.py:68:9-16: `method4` is declared as final in parent class `Base2` [bad-override] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/qualifiers_final_decorator.py:81:9-15: `method` is declared as final in parent class `Base3` [bad-override] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/qualifiers_final_decorator.py:95:9-15: `method` is declared as final in parent class `Base4` [bad-override] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/qualifiers_final_decorator.py:118:9-15: `method` is declared as final in parent class `Base5_2` [bad-override] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/qualifiers_final_decorator.py:125:1-7: Decorator `@final` can only be used on methods. [invalid-decorator] +ERROR qualifiers_final_decorator.py:21:16-21: Cannot extend final class `Base1` [invalid-inheritance] +ERROR qualifiers_final_decorator.py:56:9-16: `method1` is declared as final in parent class `Base2` [bad-override] +ERROR qualifiers_final_decorator.py:60:9-16: `method2` is declared as final in parent class `Base2` [bad-override] +ERROR qualifiers_final_decorator.py:64:9-16: `method3` is declared as final in parent class `Base2` [bad-override] +ERROR qualifiers_final_decorator.py:68:9-16: `method4` is declared as final in parent class `Base2` [bad-override] +ERROR qualifiers_final_decorator.py:81:9-15: `method` is declared as final in parent class `Base3` [bad-override] +ERROR qualifiers_final_decorator.py:95:9-15: `method` is declared as final in parent class `Base4` [bad-override] +ERROR qualifiers_final_decorator.py:118:9-15: `method` is declared as final in parent class `Base5_2` [bad-override] +ERROR qualifiers_final_decorator.py:125:1-7: Decorator `@final` can only be used on methods. [invalid-decorator] """ diff --git a/conformance/results/pyrefly/specialtypes_any.toml b/conformance/results/pyrefly/specialtypes_any.toml index cdd4d0cd..be211bd5 100644 --- a/conformance/results/pyrefly/specialtypes_any.toml +++ b/conformance/results/pyrefly/specialtypes_any.toml @@ -1,3 +1,4 @@ +conformant = "Pass" conformance_automated = "Pass" errors_diff = """ """ diff --git a/conformance/results/pyrefly/specialtypes_never.toml b/conformance/results/pyrefly/specialtypes_never.toml index c650ba95..ea293f7e 100644 --- a/conformance/results/pyrefly/specialtypes_never.toml +++ b/conformance/results/pyrefly/specialtypes_never.toml @@ -7,8 +7,8 @@ errors_diff = """ Line 32: Unexpected errors ["Returned type `Literal['whatever works']` is not assignable to declared return type `int` [bad-return]"] """ output = """ -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/specialtypes_never.py:19:22-30: Function declared to return `NoReturn` but is missing an explicit `return` [bad-return] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/specialtypes_never.py:32:12-28: Returned type `Literal['whatever works']` is not assignable to declared return type `int` [bad-return] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/specialtypes_never.py:86:21-22: `list[Never]` is not assignable to `list[int]` [bad-assignment] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/specialtypes_never.py:105:12-27: Returned type `ClassC[Never]` is not assignable to declared return type `ClassC[U]` [bad-return] +ERROR specialtypes_never.py:19:22-30: Function declared to return `NoReturn` but is missing an explicit `return` [bad-return] +ERROR specialtypes_never.py:32:12-28: Returned type `Literal['whatever works']` is not assignable to declared return type `int` [bad-return] +ERROR specialtypes_never.py:86:21-22: `list[Never]` is not assignable to `list[int]` [bad-assignment] +ERROR specialtypes_never.py:105:12-27: Returned type `ClassC[Never]` is not assignable to declared return type `ClassC[U]` [bad-return] """ diff --git a/conformance/results/pyrefly/specialtypes_none.toml b/conformance/results/pyrefly/specialtypes_none.toml index 269facdf..fcd2fb56 100644 --- a/conformance/results/pyrefly/specialtypes_none.toml +++ b/conformance/results/pyrefly/specialtypes_none.toml @@ -1,8 +1,9 @@ +conformant = "Pass" conformance_automated = "Pass" errors_diff = """ """ output = """ -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/specialtypes_none.py:21:7-17: Argument `type` is not assignable to parameter `val1` with type `None` in function `func1` [bad-argument-type] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/specialtypes_none.py:27:19-23: `None` is not assignable to `Iterable[Unknown]` [bad-assignment] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/specialtypes_none.py:41:7-11: Argument `None` is not assignable to parameter `val1` with type `type[None]` in function `func2` [bad-argument-type] +ERROR specialtypes_none.py:21:7-17: Argument `type` is not assignable to parameter `val1` with type `None` in function `func1` [bad-argument-type] +ERROR specialtypes_none.py:27:19-23: `None` is not assignable to `Iterable[Unknown]` [bad-assignment] +ERROR specialtypes_none.py:41:7-11: Argument `None` is not assignable to parameter `val1` with type `type[None]` in function `func2` [bad-argument-type] """ diff --git a/conformance/results/pyrefly/specialtypes_promotions.toml b/conformance/results/pyrefly/specialtypes_promotions.toml index 9106611a..6b038e89 100644 --- a/conformance/results/pyrefly/specialtypes_promotions.toml +++ b/conformance/results/pyrefly/specialtypes_promotions.toml @@ -1,6 +1,7 @@ +conformant = "Pass" conformance_automated = "Pass" errors_diff = """ """ output = """ -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/specialtypes_promotions.py:13:5-16: Object of class `float` has no attribute `numerator` [missing-attribute] +ERROR specialtypes_promotions.py:13:5-16: Object of class `float` has no attribute `numerator` [missing-attribute] """ diff --git a/conformance/results/pyrefly/specialtypes_type.toml b/conformance/results/pyrefly/specialtypes_type.toml index bfa048c1..0a811b35 100644 --- a/conformance/results/pyrefly/specialtypes_type.toml +++ b/conformance/results/pyrefly/specialtypes_type.toml @@ -14,19 +14,19 @@ Line 110: Unexpected errors ['assert_type(Any, tuple[type, ...]) failed [assert- Line 139: Unexpected errors ['assert_type(type, type[Any]) failed [assert-type]'] """ output = """ -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/specialtypes_type.py:56:7-15: Argument `type[TeamUser]` is not assignable to parameter `user_class` with type `type[BasicUser | ProUser]` in function `func4` [bad-argument-type] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/specialtypes_type.py:76:12-26: Expected 1 type argument for `type`, got 2 [bad-specialization] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/specialtypes_type.py:84:16-30: assert_type(type, type[Any]) failed [assert-type] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/specialtypes_type.py:99:17-26: Object of class `type` has no attribute `unknown` [missing-attribute] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/specialtypes_type.py:100:17-26: Object of class `type` has no attribute `unknown` [missing-attribute] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/specialtypes_type.py:102:16-45: assert_type(Any, tuple[type, ...]) failed [assert-type] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/specialtypes_type.py:106:16-45: assert_type(Any, tuple[type, ...]) failed [assert-type] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/specialtypes_type.py:110:16-45: assert_type(Any, tuple[type, ...]) failed [assert-type] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/specialtypes_type.py:117:5-14: Class `object` has no class attribute `unknown` [missing-attribute] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/specialtypes_type.py:120:5-14: Class `object` has no class attribute `unknown` [missing-attribute] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/specialtypes_type.py:139:16-30: assert_type(type, type[Any]) failed [assert-type] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/specialtypes_type.py:143:1-12: TODO: Expr::attr_infer_for_type attribute base undefined for type: TypeAlias[TA1, type[type[Unknown]]] (trying to access unknown) [missing-attribute] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/specialtypes_type.py:144:1-12: TODO: Expr::attr_infer_for_type attribute base undefined for type: TypeAlias[TA2, type[type[Any]]] (trying to access unknown) [missing-attribute] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/specialtypes_type.py:145:1-12: Class `type` has no class attribute `unknown` [missing-attribute] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/specialtypes_type.py:146:1-12: TODO: Expr::attr_infer_for_type attribute base undefined for type: TypeAlias[TA4, type[type[Any]]] (trying to access unknown) [missing-attribute] +ERROR specialtypes_type.py:56:7-15: Argument `type[TeamUser]` is not assignable to parameter `user_class` with type `type[BasicUser | ProUser]` in function `func4` [bad-argument-type] +ERROR specialtypes_type.py:76:12-26: Expected 1 type argument for `type`, got 2 [bad-specialization] +ERROR specialtypes_type.py:84:16-30: assert_type(type, type[Any]) failed [assert-type] +ERROR specialtypes_type.py:99:17-26: Object of class `type` has no attribute `unknown` [missing-attribute] +ERROR specialtypes_type.py:100:17-26: Object of class `type` has no attribute `unknown` [missing-attribute] +ERROR specialtypes_type.py:102:16-45: assert_type(Any, tuple[type, ...]) failed [assert-type] +ERROR specialtypes_type.py:106:16-45: assert_type(Any, tuple[type, ...]) failed [assert-type] +ERROR specialtypes_type.py:110:16-45: assert_type(Any, tuple[type, ...]) failed [assert-type] +ERROR specialtypes_type.py:117:5-14: Class `object` has no class attribute `unknown` [missing-attribute] +ERROR specialtypes_type.py:120:5-14: Class `object` has no class attribute `unknown` [missing-attribute] +ERROR specialtypes_type.py:139:16-30: assert_type(type, type[Any]) failed [assert-type] +ERROR specialtypes_type.py:143:1-12: TODO: Expr::attr_infer_for_type attribute base undefined for type: TypeAlias[TA1, type[type[Unknown]]] (trying to access unknown) [missing-attribute] +ERROR specialtypes_type.py:144:1-12: TODO: Expr::attr_infer_for_type attribute base undefined for type: TypeAlias[TA2, type[type[Any]]] (trying to access unknown) [missing-attribute] +ERROR specialtypes_type.py:145:1-12: Class `type` has no class attribute `unknown` [missing-attribute] +ERROR specialtypes_type.py:146:1-12: TODO: Expr::attr_infer_for_type attribute base undefined for type: TypeAlias[TA4, type[type[Any]]] (trying to access unknown) [missing-attribute] """ diff --git a/conformance/results/pyrefly/tuples_type_compat.toml b/conformance/results/pyrefly/tuples_type_compat.toml index 66afbaa7..c85896b7 100644 --- a/conformance/results/pyrefly/tuples_type_compat.toml +++ b/conformance/results/pyrefly/tuples_type_compat.toml @@ -1,29 +1,30 @@ +conformant = "Pass" conformance_automated = "Pass" errors_diff = """ """ output = """ -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/tuples_type_compat.py:15:27-29: `tuple[float, complex]` is not assignable to `tuple[int, int]` [bad-assignment] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/tuples_type_compat.py:29:10-12: `tuple[int, ...]` is not assignable to variable `v2` with type `tuple[int, *tuple[int, ...]]` [bad-assignment] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/tuples_type_compat.py:32:10-12: `tuple[int, *tuple[int, ...]]` is not assignable to variable `v3` with type `tuple[int]` [bad-assignment] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/tuples_type_compat.py:33:10-12: `tuple[int, ...]` is not assignable to variable `v3` with type `tuple[int]` [bad-assignment] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/tuples_type_compat.py:43:22-24: `tuple[int, ...]` is not assignable to `tuple[int]` [bad-assignment] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/tuples_type_compat.py:62:26-35: `tuple[int, ...]` is not assignable to `tuple[int, int]` [bad-assignment] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/tuples_type_compat.py:76:20-37: assert_type(tuple[int], tuple[int] | tuple[str, str] | tuple[int, *tuple[str, ...], int]) failed [assert-type] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/tuples_type_compat.py:81:20-37: assert_type(tuple[int, int] | tuple[str, str], tuple[int] | tuple[str, str] | tuple[int, *tuple[str, ...], int]) failed [assert-type] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/tuples_type_compat.py:86:20-37: assert_type(tuple[int, str, int], tuple[int] | tuple[str, str] | tuple[int, *tuple[str, ...], int]) failed [assert-type] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/tuples_type_compat.py:102:24-41: assert_type(tuple[int], tuple[int] | tuple[str, str] | tuple[int, *tuple[str, ...], int]) failed [assert-type] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/tuples_type_compat.py:107:24-41: assert_type(tuple[int, int] | tuple[str, str], tuple[int] | tuple[str, str] | tuple[int, *tuple[str, ...], int]) failed [assert-type] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/tuples_type_compat.py:112:24-41: assert_type(tuple[int, str, int], tuple[int] | tuple[str, str] | tuple[int, *tuple[str, ...], int]) failed [assert-type] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/tuples_type_compat.py:126:24-53: assert_type(tuple[int | str, int | str], tuple[int | str, str]) failed [assert-type] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/tuples_type_compat.py:129:24-53: assert_type(tuple[int | str, int | str], tuple[int | str, int]) failed [assert-type] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/tuples_type_compat.py:157:6-17: `tuple[Literal[1], Literal[''], Literal['']]` is not assignable to variable `t1` with type `tuple[int, str]` [bad-assignment] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/tuples_type_compat.py:162:6-16: `tuple[Literal[1], Literal[1], Literal['']]` is not assignable to variable `t2` with type `tuple[int, *tuple[str, ...]]` [bad-assignment] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/tuples_type_compat.py:163:6-16: `tuple[Literal[1], Literal[''], Literal[1]]` is not assignable to variable `t2` with type `tuple[int, *tuple[str, ...]]` [bad-assignment] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/tuples_type_compat.py:169:6-17: `tuple[Literal[1], Literal[''], Literal['']]` is not assignable to variable `t3` with type `tuple[int, *tuple[str, ...], int]` [bad-assignment] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/tuples_type_compat.py:170:6-22: `tuple[Literal[1], Literal[''], Literal[''], float]` is not assignable to variable `t3` with type `tuple[int, *tuple[str, ...], int]` [bad-assignment] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/tuples_type_compat.py:175:6-16: `tuple[Literal[1], Literal[''], Literal[1]]` is not assignable to variable `t4` with type `tuple[*tuple[str, ...], int]` [bad-assignment] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/tuples_type_compat.py:176:6-19: `tuple[Literal[''], Literal[''], float]` is not assignable to variable `t4` with type `tuple[*tuple[str, ...], int]` [bad-assignment] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/tuples_type_compat.py:181:40-41: `tuple[str, str]` is not assignable to `tuple[str, str, int]` [bad-assignment] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/tuples_type_compat.py:184:50-51: `tuple[str, str]` is not assignable to `tuple[str, str, str, *tuple[str, ...]]` [bad-assignment] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/tuples_type_compat.py:188:50-51: `tuple[str, str]` is not assignable to `tuple[*tuple[str, ...], str, str, str]` [bad-assignment] +ERROR tuples_type_compat.py:15:27-29: `tuple[float, complex]` is not assignable to `tuple[int, int]` [bad-assignment] +ERROR tuples_type_compat.py:29:10-12: `tuple[int, ...]` is not assignable to variable `v2` with type `tuple[int, *tuple[int, ...]]` [bad-assignment] +ERROR tuples_type_compat.py:32:10-12: `tuple[int, *tuple[int, ...]]` is not assignable to variable `v3` with type `tuple[int]` [bad-assignment] +ERROR tuples_type_compat.py:33:10-12: `tuple[int, ...]` is not assignable to variable `v3` with type `tuple[int]` [bad-assignment] +ERROR tuples_type_compat.py:43:22-24: `tuple[int, ...]` is not assignable to `tuple[int]` [bad-assignment] +ERROR tuples_type_compat.py:62:26-35: `tuple[int, ...]` is not assignable to `tuple[int, int]` [bad-assignment] +ERROR tuples_type_compat.py:76:20-37: assert_type(tuple[int], tuple[int] | tuple[str, str] | tuple[int, *tuple[str, ...], int]) failed [assert-type] +ERROR tuples_type_compat.py:81:20-37: assert_type(tuple[int, int] | tuple[str, str], tuple[int] | tuple[str, str] | tuple[int, *tuple[str, ...], int]) failed [assert-type] +ERROR tuples_type_compat.py:86:20-37: assert_type(tuple[int, str, int], tuple[int] | tuple[str, str] | tuple[int, *tuple[str, ...], int]) failed [assert-type] +ERROR tuples_type_compat.py:102:24-41: assert_type(tuple[int], tuple[int] | tuple[str, str] | tuple[int, *tuple[str, ...], int]) failed [assert-type] +ERROR tuples_type_compat.py:107:24-41: assert_type(tuple[int, int] | tuple[str, str], tuple[int] | tuple[str, str] | tuple[int, *tuple[str, ...], int]) failed [assert-type] +ERROR tuples_type_compat.py:112:24-41: assert_type(tuple[int, str, int], tuple[int] | tuple[str, str] | tuple[int, *tuple[str, ...], int]) failed [assert-type] +ERROR tuples_type_compat.py:126:24-53: assert_type(tuple[int | str, int | str], tuple[int | str, str]) failed [assert-type] +ERROR tuples_type_compat.py:129:24-53: assert_type(tuple[int | str, int | str], tuple[int | str, int]) failed [assert-type] +ERROR tuples_type_compat.py:157:6-17: `tuple[Literal[1], Literal[''], Literal['']]` is not assignable to variable `t1` with type `tuple[int, str]` [bad-assignment] +ERROR tuples_type_compat.py:162:6-16: `tuple[Literal[1], Literal[1], Literal['']]` is not assignable to variable `t2` with type `tuple[int, *tuple[str, ...]]` [bad-assignment] +ERROR tuples_type_compat.py:163:6-16: `tuple[Literal[1], Literal[''], Literal[1]]` is not assignable to variable `t2` with type `tuple[int, *tuple[str, ...]]` [bad-assignment] +ERROR tuples_type_compat.py:169:6-17: `tuple[Literal[1], Literal[''], Literal['']]` is not assignable to variable `t3` with type `tuple[int, *tuple[str, ...], int]` [bad-assignment] +ERROR tuples_type_compat.py:170:6-22: `tuple[Literal[1], Literal[''], Literal[''], float]` is not assignable to variable `t3` with type `tuple[int, *tuple[str, ...], int]` [bad-assignment] +ERROR tuples_type_compat.py:175:6-16: `tuple[Literal[1], Literal[''], Literal[1]]` is not assignable to variable `t4` with type `tuple[*tuple[str, ...], int]` [bad-assignment] +ERROR tuples_type_compat.py:176:6-19: `tuple[Literal[''], Literal[''], float]` is not assignable to variable `t4` with type `tuple[*tuple[str, ...], int]` [bad-assignment] +ERROR tuples_type_compat.py:181:40-41: `tuple[str, str]` is not assignable to `tuple[str, str, int]` [bad-assignment] +ERROR tuples_type_compat.py:184:50-51: `tuple[str, str]` is not assignable to `tuple[str, str, str, *tuple[str, ...]]` [bad-assignment] +ERROR tuples_type_compat.py:188:50-51: `tuple[str, str]` is not assignable to `tuple[*tuple[str, ...], str, str, str]` [bad-assignment] """ diff --git a/conformance/results/pyrefly/tuples_type_form.toml b/conformance/results/pyrefly/tuples_type_form.toml index b61a3f3f..7a9c92c8 100644 --- a/conformance/results/pyrefly/tuples_type_form.toml +++ b/conformance/results/pyrefly/tuples_type_form.toml @@ -1,16 +1,17 @@ +conformant = "Pass" conformance_automated = "Pass" errors_diff = """ """ output = """ -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/tuples_type_form.py:12:6-12: `tuple[Literal[1], Literal[2]]` is not assignable to variable `t1` with type `tuple[int]` [bad-assignment] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/tuples_type_form.py:14:6-10: `tuple[Literal[1]]` is not assignable to variable `t2` with type `tuple[int, int]` [bad-assignment] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/tuples_type_form.py:15:6-13: `tuple[Literal[1], Literal['']]` is not assignable to variable `t2` with type `tuple[int, int]` [bad-assignment] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/tuples_type_form.py:25:7-11: `tuple[Literal[1]]` is not assignable to variable `t10` with type `tuple[()]` [bad-assignment] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/tuples_type_form.py:36:7-20: `tuple[Literal[1], Literal[2], Literal[3], Literal['']]` is not assignable to variable `t20` with type `tuple[int, ...]` [bad-assignment] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/tuples_type_form.py:40:22-25: Invalid position for `...` [invalid-argument] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/tuples_type_form.py:41:12-15: Invalid position for `...` [invalid-argument] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/tuples_type_form.py:42:12-15: Invalid position for `...` [invalid-argument] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/tuples_type_form.py:43:17-20: Invalid position for `...` [invalid-argument] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/tuples_type_form.py:44:25-28: `...` cannot be used with an unpacked `TypeVarTuple` or tuple [invalid-argument] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/tuples_type_form.py:45:30-33: Invalid position for `...` [invalid-argument] +ERROR tuples_type_form.py:12:6-12: `tuple[Literal[1], Literal[2]]` is not assignable to variable `t1` with type `tuple[int]` [bad-assignment] +ERROR tuples_type_form.py:14:6-10: `tuple[Literal[1]]` is not assignable to variable `t2` with type `tuple[int, int]` [bad-assignment] +ERROR tuples_type_form.py:15:6-13: `tuple[Literal[1], Literal['']]` is not assignable to variable `t2` with type `tuple[int, int]` [bad-assignment] +ERROR tuples_type_form.py:25:7-11: `tuple[Literal[1]]` is not assignable to variable `t10` with type `tuple[()]` [bad-assignment] +ERROR tuples_type_form.py:36:7-20: `tuple[Literal[1], Literal[2], Literal[3], Literal['']]` is not assignable to variable `t20` with type `tuple[int, ...]` [bad-assignment] +ERROR tuples_type_form.py:40:22-25: Invalid position for `...` [invalid-argument] +ERROR tuples_type_form.py:41:12-15: Invalid position for `...` [invalid-argument] +ERROR tuples_type_form.py:42:12-15: Invalid position for `...` [invalid-argument] +ERROR tuples_type_form.py:43:17-20: Invalid position for `...` [invalid-argument] +ERROR tuples_type_form.py:44:25-28: `...` cannot be used with an unpacked `TypeVarTuple` or tuple [invalid-argument] +ERROR tuples_type_form.py:45:30-33: Invalid position for `...` [invalid-argument] """ diff --git a/conformance/results/pyrefly/tuples_unpacked.toml b/conformance/results/pyrefly/tuples_unpacked.toml index 9aed4458..8792b453 100644 --- a/conformance/results/pyrefly/tuples_unpacked.toml +++ b/conformance/results/pyrefly/tuples_unpacked.toml @@ -1,10 +1,11 @@ +conformant = "Pass" conformance_automated = "Pass" errors_diff = """ """ output = """ -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/tuples_unpacked.py:40:29-45: Only one unbounded type is allowed to be unpacked [bad-unpacking] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/tuples_unpacked.py:41:42-58: Only one unbounded type is allowed to be unpacked [bad-unpacking] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/tuples_unpacked.py:51:33-36: Only one unbounded type is allowed to be unpacked [bad-unpacking] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/tuples_unpacked.py:59:37-60: Only one unbounded type is allowed to be unpacked [bad-unpacking] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/tuples_unpacked.py:61:50-73: Only one unbounded type is allowed to be unpacked [bad-unpacking] +ERROR tuples_unpacked.py:40:29-45: Only one unbounded type is allowed to be unpacked [bad-unpacking] +ERROR tuples_unpacked.py:41:42-58: Only one unbounded type is allowed to be unpacked [bad-unpacking] +ERROR tuples_unpacked.py:51:33-36: Only one unbounded type is allowed to be unpacked [bad-unpacking] +ERROR tuples_unpacked.py:59:37-60: Only one unbounded type is allowed to be unpacked [bad-unpacking] +ERROR tuples_unpacked.py:61:50-73: Only one unbounded type is allowed to be unpacked [bad-unpacking] """ diff --git a/conformance/results/pyrefly/typeddicts_alt_syntax.toml b/conformance/results/pyrefly/typeddicts_alt_syntax.toml index f2007d8e..82ee6fb6 100644 --- a/conformance/results/pyrefly/typeddicts_alt_syntax.toml +++ b/conformance/results/pyrefly/typeddicts_alt_syntax.toml @@ -1,16 +1,17 @@ +conformant = "Pass" conformance_automated = "Pass" errors_diff = """ """ output = """ -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/typeddicts_alt_syntax.py:23:1-14: Expected valid functional typed dictionary definition [invalid-argument] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/typeddicts_alt_syntax.py:27:45-46: Expected first item to be a string literal [invalid-argument] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/typeddicts_alt_syntax.py:31:27-38: Expected string literal "BadTypedDict3" [invalid-argument] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/typeddicts_alt_syntax.py:35:72-83: Unrecognized argument `other` for typed dictionary definition [invalid-argument] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/typeddicts_alt_syntax.py:41:1-7: Expected valid functional typed dictionary definition [invalid-argument] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/typeddicts_alt_syntax.py:41:30-38: Unrecognized argument `name` for typed dictionary definition [invalid-argument] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/typeddicts_alt_syntax.py:41:40-48: Unrecognized argument `year` for typed dictionary definition [invalid-argument] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/typeddicts_alt_syntax.py:44:11-17: Key `name` is not defined in TypedDict `Movie2` [typed-dict-key-error] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/typeddicts_alt_syntax.py:44:35-41: Key `year` is not defined in TypedDict `Movie2` [typed-dict-key-error] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/typeddicts_alt_syntax.py:45:11-17: Key `name` is not defined in TypedDict `Movie2` [typed-dict-key-error] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/typeddicts_alt_syntax.py:45:35-41: Key `year` is not defined in TypedDict `Movie2` [typed-dict-key-error] +ERROR typeddicts_alt_syntax.py:23:1-14: Expected valid functional typed dictionary definition [invalid-argument] +ERROR typeddicts_alt_syntax.py:27:45-46: Expected first item to be a string literal [invalid-argument] +ERROR typeddicts_alt_syntax.py:31:27-38: Expected string literal "BadTypedDict3" [invalid-argument] +ERROR typeddicts_alt_syntax.py:35:72-83: Unrecognized argument `other` for typed dictionary definition [invalid-argument] +ERROR typeddicts_alt_syntax.py:41:1-7: Expected valid functional typed dictionary definition [invalid-argument] +ERROR typeddicts_alt_syntax.py:41:30-38: Unrecognized argument `name` for typed dictionary definition [invalid-argument] +ERROR typeddicts_alt_syntax.py:41:40-48: Unrecognized argument `year` for typed dictionary definition [invalid-argument] +ERROR typeddicts_alt_syntax.py:44:11-17: Key `name` is not defined in TypedDict `Movie2` [typed-dict-key-error] +ERROR typeddicts_alt_syntax.py:44:35-41: Key `year` is not defined in TypedDict `Movie2` [typed-dict-key-error] +ERROR typeddicts_alt_syntax.py:45:11-17: Key `name` is not defined in TypedDict `Movie2` [typed-dict-key-error] +ERROR typeddicts_alt_syntax.py:45:35-41: Key `year` is not defined in TypedDict `Movie2` [typed-dict-key-error] """ diff --git a/conformance/results/pyrefly/typeddicts_class_syntax.toml b/conformance/results/pyrefly/typeddicts_class_syntax.toml index 27ade3f1..c620b102 100644 --- a/conformance/results/pyrefly/typeddicts_class_syntax.toml +++ b/conformance/results/pyrefly/typeddicts_class_syntax.toml @@ -1,10 +1,11 @@ +conformant = "Pass" conformance_automated = "Pass" errors_diff = """ """ output = """ -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/typeddicts_class_syntax.py:29:9-16: TypedDict item `method1` may not be initialized [bad-class-definition] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/typeddicts_class_syntax.py:34:9-16: TypedDict item `method2` may not be initialized [bad-class-definition] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/typeddicts_class_syntax.py:39:9-16: TypedDict item `method3` may not be initialized [bad-class-definition] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/typeddicts_class_syntax.py:44:7-20: Typed dictionary definitions may not specify a metaclass [invalid-inheritance] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/typeddicts_class_syntax.py:49:7-20: TypedDict does not support keyword argument `other` [bad-typed-dict] +ERROR typeddicts_class_syntax.py:29:9-16: TypedDict item `method1` may not be initialized [bad-class-definition] +ERROR typeddicts_class_syntax.py:34:9-16: TypedDict item `method2` may not be initialized [bad-class-definition] +ERROR typeddicts_class_syntax.py:39:9-16: TypedDict item `method3` may not be initialized [bad-class-definition] +ERROR typeddicts_class_syntax.py:44:7-20: Typed dictionary definitions may not specify a metaclass [invalid-inheritance] +ERROR typeddicts_class_syntax.py:49:7-20: TypedDict does not support keyword argument `other` [bad-typed-dict] """ diff --git a/conformance/results/pyrefly/typeddicts_extra_items.toml b/conformance/results/pyrefly/typeddicts_extra_items.toml index f4aa5ce8..341dd6c9 100644 --- a/conformance/results/pyrefly/typeddicts_extra_items.toml +++ b/conformance/results/pyrefly/typeddicts_extra_items.toml @@ -15,42 +15,42 @@ Line 339: Unexpected errors ['assert_type(Any, tuple[str, int]) failed [assert-t Line 343: Unexpected errors ['Cannot delete item in `TypedDict[IntDictWithNum]` [unsupported-operation]'] """ output = """ -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/typeddicts_extra_items.py:15:45-49: `Literal[1982]` is not assignable to TypedDict `extra_items` type `bool` [typed-dict-key-error] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/typeddicts_extra_items.py:22:55-59: `Literal[1982]` is not assignable to TypedDict `extra_items` type `bool` [typed-dict-key-error] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/typeddicts_extra_items.py:39:54-58: `None` is not assignable to TypedDict key `year` with type `int` [typed-dict-key-error] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/typeddicts_extra_items.py:49:7-16: Expected literal True or False for keyword `closed`, got instance of `bool` [bad-typed-dict] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/typeddicts_extra_items.py:67:7-20: Non-closed TypedDict cannot inherit from closed TypedDict `ClosedBase` [bad-typed-dict] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/typeddicts_extra_items.py:73:7-20: Non-closed TypedDict cannot inherit from TypedDict `ExtraItemsBase` with extra items [bad-typed-dict] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/typeddicts_extra_items.py:92:5-8: Cannot extend closed TypedDict `MovieA` with extra item `age` [typed-dict-key-error] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/typeddicts_extra_items.py:95:5-8: Cannot extend closed TypedDict `MovieB` with extra item `age` [typed-dict-key-error] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/typeddicts_extra_items.py:109:7-30: Closed TypedDict cannot inherit from TypedDict `ExtraItemsBase` with non-read-only extra items [bad-typed-dict] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/typeddicts_extra_items.py:114:50-63: `Required` is not allowed in this context [invalid-annotation] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/typeddicts_extra_items.py:117:57-73: `NotRequired` is not allowed in this context [invalid-annotation] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/typeddicts_extra_items.py:128:15-21: Key `name` in TypedDict `MovieEI` may not be deleted [delete-error] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/typeddicts_extra_items.py:129:15-21: TypedDict `MovieEI` does not have key `year` [typed-dict-key-error] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/typeddicts_extra_items.py:143:48-52: Unexpected keyword argument `year` in function `unpack_no_extra` [unexpected-keyword] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/typeddicts_extra_items.py:144:45-49: Unexpected keyword argument `year` in function `unpack_extra` [unexpected-keyword] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/typeddicts_extra_items.py:174:7-12: Cannot change the non-read-only extra items type of TypedDict `Parent` [bad-typed-dict] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/typeddicts_extra_items.py:185:5-9: TypedDict `MovieBase2` with non-read-only `extra_items` cannot be extended with required extra item `year` [typed-dict-key-error] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/typeddicts_extra_items.py:188:5-9: `int` is not consistent with `extra_items` type `int | None` of TypedDict `MovieBase2` [typed-dict-key-error] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/typeddicts_extra_items.py:197:5-14: `str` is not assignable to `extra_items` type `int | None` of TypedDict `BookBase` [typed-dict-key-error] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/typeddicts_extra_items.py:215:22-30: `TypedDict[MovieDetails]` is not assignable to `TypedDict[MovieBase2]` [bad-assignment] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/typeddicts_extra_items.py:222:22-30: `TypedDict[MovieWithYear2]` is not assignable to `TypedDict[MovieBase2]` [bad-assignment] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/typeddicts_extra_items.py:242:19-27: `TypedDict[MovieDetails5]` is not assignable to `TypedDict[MovieSI]` [bad-assignment] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/typeddicts_extra_items.py:256:13-22: `TypedDict[MovieExtraStr]` is not assignable to variable `extra_int` with type `TypedDict[MovieExtraInt]` [bad-assignment] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/typeddicts_extra_items.py:257:13-22: `TypedDict[MovieExtraInt]` is not assignable to variable `extra_str` with type `TypedDict[MovieExtraStr]` [bad-assignment] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/typeddicts_extra_items.py:268:14-24: `TypedDict[MovieNotClosed]` is not assignable to variable `extra_int2` with type `TypedDict[MovieExtraInt]` [bad-assignment] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/typeddicts_extra_items.py:278:47-51: Unexpected keyword argument `year` in function `NonClosedMovie.__init__` [unexpected-keyword] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/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 /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/typeddicts_extra_items.py:293:44-48: Unexpected keyword argument `year` in function `ClosedMovie.__init__` [unexpected-keyword] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/typeddicts_extra_items.py:300:34-44: `TypedDict[MovieExtraStr]` is not assignable to `Mapping[str, str]` [bad-assignment] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/typeddicts_extra_items.py:303:34-44: `TypedDict[MovieExtraInt]` is not assignable to `Mapping[str, int]` [bad-assignment] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/typeddicts_extra_items.py:304:44-54: `TypedDict[MovieExtraInt]` is not assignable to `Mapping[str, int | str]` [bad-assignment] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/typeddicts_extra_items.py:326:25-26: `TypedDict[IntDict]` is not assignable to `dict[str, int]` [bad-assignment] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/typeddicts_extra_items.py:330:32-53: `TypedDict[IntDictWithNum]` is not assignable to `dict[str, int]` [bad-assignment] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/typeddicts_extra_items.py:337:1-28: Object of class `IntDictWithNum` has no attribute `clear` [missing-attribute] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/typeddicts_extra_items.py:339:12-62: assert_type(Any, tuple[str, int]) failed [assert-type] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/typeddicts_extra_items.py:339:13-42: Object of class `IntDictWithNum` has no attribute `popitem` [missing-attribute] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/typeddicts_extra_items.py:343:9-35: Cannot delete item in `TypedDict[IntDictWithNum]` [unsupported-operation] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/typeddicts_extra_items.py:352:25-52: `dict[str, int]` is not assignable to `TypedDict[IntDict]` [bad-assignment] +ERROR typeddicts_extra_items.py:15:45-49: `Literal[1982]` is not assignable to TypedDict `extra_items` type `bool` [typed-dict-key-error] +ERROR typeddicts_extra_items.py:22:55-59: `Literal[1982]` is not assignable to TypedDict `extra_items` type `bool` [typed-dict-key-error] +ERROR typeddicts_extra_items.py:39:54-58: `None` is not assignable to TypedDict key `year` with type `int` [typed-dict-key-error] +ERROR typeddicts_extra_items.py:49:7-16: Expected literal True or False for keyword `closed`, got instance of `bool` [bad-typed-dict] +ERROR typeddicts_extra_items.py:67:7-20: Non-closed TypedDict cannot inherit from closed TypedDict `ClosedBase` [bad-typed-dict] +ERROR typeddicts_extra_items.py:73:7-20: Non-closed TypedDict cannot inherit from TypedDict `ExtraItemsBase` with extra items [bad-typed-dict] +ERROR typeddicts_extra_items.py:92:5-8: Cannot extend closed TypedDict `MovieA` with extra item `age` [typed-dict-key-error] +ERROR typeddicts_extra_items.py:95:5-8: Cannot extend closed TypedDict `MovieB` with extra item `age` [typed-dict-key-error] +ERROR typeddicts_extra_items.py:109:7-30: Closed TypedDict cannot inherit from TypedDict `ExtraItemsBase` with non-read-only extra items [bad-typed-dict] +ERROR typeddicts_extra_items.py:114:50-63: `Required` is not allowed in this context [invalid-annotation] +ERROR typeddicts_extra_items.py:117:57-73: `NotRequired` is not allowed in this context [invalid-annotation] +ERROR typeddicts_extra_items.py:128:15-21: Key `name` in TypedDict `MovieEI` may not be deleted [delete-error] +ERROR typeddicts_extra_items.py:129:15-21: TypedDict `MovieEI` does not have key `year` [typed-dict-key-error] +ERROR typeddicts_extra_items.py:143:48-52: Unexpected keyword argument `year` in function `unpack_no_extra` [unexpected-keyword] +ERROR typeddicts_extra_items.py:144:45-49: Unexpected keyword argument `year` in function `unpack_extra` [unexpected-keyword] +ERROR typeddicts_extra_items.py:174:7-12: Cannot change the non-read-only extra items type of TypedDict `Parent` [bad-typed-dict] +ERROR typeddicts_extra_items.py:185:5-9: TypedDict `MovieBase2` with non-read-only `extra_items` cannot be extended with required extra item `year` [typed-dict-key-error] +ERROR typeddicts_extra_items.py:188:5-9: `int` is not consistent with `extra_items` type `int | None` of TypedDict `MovieBase2` [typed-dict-key-error] +ERROR typeddicts_extra_items.py:197:5-14: `str` is not assignable to `extra_items` type `int | None` of TypedDict `BookBase` [typed-dict-key-error] +ERROR typeddicts_extra_items.py:215:22-30: `TypedDict[MovieDetails]` is not assignable to `TypedDict[MovieBase2]` [bad-assignment] +ERROR typeddicts_extra_items.py:222:22-30: `TypedDict[MovieWithYear2]` is not assignable to `TypedDict[MovieBase2]` [bad-assignment] +ERROR typeddicts_extra_items.py:242:19-27: `TypedDict[MovieDetails5]` is not assignable to `TypedDict[MovieSI]` [bad-assignment] +ERROR typeddicts_extra_items.py:256:13-22: `TypedDict[MovieExtraStr]` is not assignable to variable `extra_int` with type `TypedDict[MovieExtraInt]` [bad-assignment] +ERROR typeddicts_extra_items.py:257:13-22: `TypedDict[MovieExtraInt]` is not assignable to variable `extra_str` with type `TypedDict[MovieExtraStr]` [bad-assignment] +ERROR typeddicts_extra_items.py:268:14-24: `TypedDict[MovieNotClosed]` is not assignable to variable `extra_int2` with type `TypedDict[MovieExtraInt]` [bad-assignment] +ERROR typeddicts_extra_items.py:278:47-51: Unexpected keyword argument `year` in function `NonClosedMovie.__init__` [unexpected-keyword] +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:44-48: Unexpected keyword argument `year` in function `ClosedMovie.__init__` [unexpected-keyword] +ERROR typeddicts_extra_items.py:300:34-44: `TypedDict[MovieExtraStr]` is not assignable to `Mapping[str, str]` [bad-assignment] +ERROR typeddicts_extra_items.py:303:34-44: `TypedDict[MovieExtraInt]` is not assignable to `Mapping[str, int]` [bad-assignment] +ERROR typeddicts_extra_items.py:304:44-54: `TypedDict[MovieExtraInt]` is not assignable to `Mapping[str, int | str]` [bad-assignment] +ERROR typeddicts_extra_items.py:326:25-26: `TypedDict[IntDict]` is not assignable to `dict[str, int]` [bad-assignment] +ERROR typeddicts_extra_items.py:330:32-53: `TypedDict[IntDictWithNum]` is not assignable to `dict[str, int]` [bad-assignment] +ERROR typeddicts_extra_items.py:337:1-28: Object of class `IntDictWithNum` has no attribute `clear` [missing-attribute] +ERROR typeddicts_extra_items.py:339:12-62: assert_type(Any, tuple[str, int]) failed [assert-type] +ERROR typeddicts_extra_items.py:339:13-42: Object of class `IntDictWithNum` has no attribute `popitem` [missing-attribute] +ERROR typeddicts_extra_items.py:343:9-35: Cannot delete item in `TypedDict[IntDictWithNum]` [unsupported-operation] +ERROR typeddicts_extra_items.py:352:25-52: `dict[str, int]` is not assignable to `TypedDict[IntDict]` [bad-assignment] """ diff --git a/conformance/results/pyrefly/typeddicts_final.toml b/conformance/results/pyrefly/typeddicts_final.toml index cdd4d0cd..be211bd5 100644 --- a/conformance/results/pyrefly/typeddicts_final.toml +++ b/conformance/results/pyrefly/typeddicts_final.toml @@ -1,3 +1,4 @@ +conformant = "Pass" conformance_automated = "Pass" errors_diff = """ """ diff --git a/conformance/results/pyrefly/typeddicts_inheritance.toml b/conformance/results/pyrefly/typeddicts_inheritance.toml index 60a91238..1e3dd727 100644 --- a/conformance/results/pyrefly/typeddicts_inheritance.toml +++ b/conformance/results/pyrefly/typeddicts_inheritance.toml @@ -7,6 +7,6 @@ errors_diff = """ Line 65: Expected 1 errors """ output = """ -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/typeddicts_inheritance.py:44:7-19: `NonTypedDict` is not a typed dictionary. Typed dictionary definitions may only extend other typed dictionaries. [invalid-inheritance] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/typeddicts_inheritance.py:55:4-5: Class member `Y1.x` overrides parent class `X1` in an inconsistent manner [bad-override] +ERROR typeddicts_inheritance.py:44:7-19: `NonTypedDict` is not a typed dictionary. Typed dictionary definitions may only extend other typed dictionaries. [invalid-inheritance] +ERROR typeddicts_inheritance.py:55:4-5: Class member `Y1.x` overrides parent class `X1` in an inconsistent manner [bad-override] """ diff --git a/conformance/results/pyrefly/typeddicts_operations.toml b/conformance/results/pyrefly/typeddicts_operations.toml index fb103ce9..a145cff0 100644 --- a/conformance/results/pyrefly/typeddicts_operations.toml +++ b/conformance/results/pyrefly/typeddicts_operations.toml @@ -1,17 +1,18 @@ +conformant = "Pass" conformance_automated = "Pass" errors_diff = """ """ output = """ -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/typeddicts_operations.py:22:17-21: `Literal[1982]` is not assignable to TypedDict key `name` with type `str` [typed-dict-key-error] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/typeddicts_operations.py:23:17-19: `Literal['']` is not assignable to TypedDict key `year` with type `int` [typed-dict-key-error] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/typeddicts_operations.py:24:7-14: TypedDict `Movie` does not have key `other` [typed-dict-key-error] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/typeddicts_operations.py:26:13-20: TypedDict `Movie` does not have key `other` [typed-dict-key-error] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/typeddicts_operations.py:28:9-33: Missing required key `year` for TypedDict `Movie` [typed-dict-key-error] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/typeddicts_operations.py:29:42-48: `float` is not assignable to TypedDict key `year` with type `int` [typed-dict-key-error] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/typeddicts_operations.py:32:36-43: Key `other` is not defined in TypedDict `Movie` [typed-dict-key-error] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/typeddicts_operations.py:37:20-52: Missing required key `name` for TypedDict `Movie` [typed-dict-key-error] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/typeddicts_operations.py:37:21-33: Expected string literal key, got `str` [typed-dict-key-error] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/typeddicts_operations.py:47:1-12: Object of class `Movie` has no attribute `clear` [missing-attribute] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/typeddicts_operations.py:49:11-17: Key `name` in TypedDict `Movie` may not be deleted [delete-error] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/typeddicts_operations.py:62:1-21: Object of class `MovieOptional` has no attribute `clear` [missing-attribute] +ERROR typeddicts_operations.py:22:17-21: `Literal[1982]` is not assignable to TypedDict key `name` with type `str` [typed-dict-key-error] +ERROR typeddicts_operations.py:23:17-19: `Literal['']` is not assignable to TypedDict key `year` with type `int` [typed-dict-key-error] +ERROR typeddicts_operations.py:24:7-14: TypedDict `Movie` does not have key `other` [typed-dict-key-error] +ERROR typeddicts_operations.py:26:13-20: TypedDict `Movie` does not have key `other` [typed-dict-key-error] +ERROR typeddicts_operations.py:28:9-33: Missing required key `year` for TypedDict `Movie` [typed-dict-key-error] +ERROR typeddicts_operations.py:29:42-48: `float` is not assignable to TypedDict key `year` with type `int` [typed-dict-key-error] +ERROR typeddicts_operations.py:32:36-43: Key `other` is not defined in TypedDict `Movie` [typed-dict-key-error] +ERROR typeddicts_operations.py:37:20-52: Missing required key `name` for TypedDict `Movie` [typed-dict-key-error] +ERROR typeddicts_operations.py:37:21-33: Expected string literal key, got `str` [typed-dict-key-error] +ERROR typeddicts_operations.py:47:1-12: Object of class `Movie` has no attribute `clear` [missing-attribute] +ERROR typeddicts_operations.py:49:11-17: Key `name` in TypedDict `Movie` may not be deleted [delete-error] +ERROR typeddicts_operations.py:62:1-21: Object of class `MovieOptional` has no attribute `clear` [missing-attribute] """ diff --git a/conformance/results/pyrefly/typeddicts_readonly.toml b/conformance/results/pyrefly/typeddicts_readonly.toml index 1f81634c..8b0f34d7 100644 --- a/conformance/results/pyrefly/typeddicts_readonly.toml +++ b/conformance/results/pyrefly/typeddicts_readonly.toml @@ -1,11 +1,12 @@ +conformant = "Pass" conformance_automated = "Pass" errors_diff = """ """ output = """ -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/typeddicts_readonly.py:24:1-14: Key `members` in TypedDict `Band` is read-only [read-only] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/typeddicts_readonly.py:36:1-14: Key `members` in TypedDict `Band2` is read-only [read-only] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/typeddicts_readonly.py:50:1-12: Key `title` in TypedDict `Movie1` is read-only [read-only] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/typeddicts_readonly.py:51:1-11: Key `year` in TypedDict `Movie1` is read-only [read-only] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/typeddicts_readonly.py:60:1-12: Key `title` in TypedDict `Movie2` is read-only [read-only] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/typeddicts_readonly.py:61:1-11: Key `year` in TypedDict `Movie2` is read-only [read-only] +ERROR typeddicts_readonly.py:24:1-14: Key `members` in TypedDict `Band` is read-only [read-only] +ERROR typeddicts_readonly.py:36:1-14: Key `members` in TypedDict `Band2` is read-only [read-only] +ERROR typeddicts_readonly.py:50:1-12: Key `title` in TypedDict `Movie1` is read-only [read-only] +ERROR typeddicts_readonly.py:51:1-11: Key `year` in TypedDict `Movie1` is read-only [read-only] +ERROR typeddicts_readonly.py:60:1-12: Key `title` in TypedDict `Movie2` is read-only [read-only] +ERROR typeddicts_readonly.py:61:1-11: Key `year` in TypedDict `Movie2` is read-only [read-only] """ diff --git a/conformance/results/pyrefly/typeddicts_readonly_consistency.toml b/conformance/results/pyrefly/typeddicts_readonly_consistency.toml index 6ac703eb..90edd6de 100644 --- a/conformance/results/pyrefly/typeddicts_readonly_consistency.toml +++ b/conformance/results/pyrefly/typeddicts_readonly_consistency.toml @@ -1,12 +1,13 @@ +conformant = "Pass" conformance_automated = "Pass" errors_diff = """ """ output = """ -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/typeddicts_readonly_consistency.py:37:14-15: `TypedDict[A1]` is not assignable to `TypedDict[B1]` [bad-assignment] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/typeddicts_readonly_consistency.py:38:14-15: `TypedDict[C1]` is not assignable to `TypedDict[B1]` [bad-assignment] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/typeddicts_readonly_consistency.py:40:14-15: `TypedDict[A1]` is not assignable to `TypedDict[C1]` [bad-assignment] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/typeddicts_readonly_consistency.py:81:14-15: `TypedDict[A2]` is not assignable to `TypedDict[B2]` [bad-assignment] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/typeddicts_readonly_consistency.py:82:14-15: `TypedDict[C2]` is not assignable to `TypedDict[B2]` [bad-assignment] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/typeddicts_readonly_consistency.py:84:14-15: `TypedDict[A2]` is not assignable to `TypedDict[C2]` [bad-assignment] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/typeddicts_readonly_consistency.py:85:14-15: `TypedDict[B2]` is not assignable to `TypedDict[C2]` [bad-assignment] +ERROR typeddicts_readonly_consistency.py:37:14-15: `TypedDict[A1]` is not assignable to `TypedDict[B1]` [bad-assignment] +ERROR typeddicts_readonly_consistency.py:38:14-15: `TypedDict[C1]` is not assignable to `TypedDict[B1]` [bad-assignment] +ERROR typeddicts_readonly_consistency.py:40:14-15: `TypedDict[A1]` is not assignable to `TypedDict[C1]` [bad-assignment] +ERROR typeddicts_readonly_consistency.py:81:14-15: `TypedDict[A2]` is not assignable to `TypedDict[B2]` [bad-assignment] +ERROR typeddicts_readonly_consistency.py:82:14-15: `TypedDict[C2]` is not assignable to `TypedDict[B2]` [bad-assignment] +ERROR typeddicts_readonly_consistency.py:84:14-15: `TypedDict[A2]` is not assignable to `TypedDict[C2]` [bad-assignment] +ERROR typeddicts_readonly_consistency.py:85:14-15: `TypedDict[B2]` is not assignable to `TypedDict[C2]` [bad-assignment] """ diff --git a/conformance/results/pyrefly/typeddicts_readonly_inheritance.toml b/conformance/results/pyrefly/typeddicts_readonly_inheritance.toml index 5041a6dc..1c90b669 100644 --- a/conformance/results/pyrefly/typeddicts_readonly_inheritance.toml +++ b/conformance/results/pyrefly/typeddicts_readonly_inheritance.toml @@ -10,11 +10,11 @@ Line 119: Expected 1 errors Line 132: Expected 1 errors """ output = """ -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/typeddicts_readonly_inheritance.py:36:1-11: Key `name` in TypedDict `Album2` is read-only [read-only] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/typeddicts_readonly_inheritance.py:50:5-8: Class member `RecordShop.alt` overrides parent class `AlbumCollection` in an inconsistent manner [bad-override] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/typeddicts_readonly_inheritance.py:65:19-21: Missing required key `name` for TypedDict `RequiredName` [typed-dict-key-error] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/typeddicts_readonly_inheritance.py:82:14-15: `Literal[3]` is not assignable to TypedDict key `ident` with type `str` [typed-dict-key-error] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/typeddicts_readonly_inheritance.py:83:15-16: `Literal[3]` is not assignable to TypedDict key `ident` with type `str` [typed-dict-key-error] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/typeddicts_readonly_inheritance.py:84:5-7: Missing required key `ident` for TypedDict `User` [typed-dict-key-error] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/typeddicts_readonly_inheritance.py:94:5-6: Class member `F3.a` overrides parent class `F1` in an inconsistent manner [bad-override] +ERROR typeddicts_readonly_inheritance.py:36:1-11: Key `name` in TypedDict `Album2` is read-only [read-only] +ERROR typeddicts_readonly_inheritance.py:50:5-8: Class member `RecordShop.alt` overrides parent class `AlbumCollection` in an inconsistent manner [bad-override] +ERROR typeddicts_readonly_inheritance.py:65:19-21: Missing required key `name` for TypedDict `RequiredName` [typed-dict-key-error] +ERROR typeddicts_readonly_inheritance.py:82:14-15: `Literal[3]` is not assignable to TypedDict key `ident` with type `str` [typed-dict-key-error] +ERROR typeddicts_readonly_inheritance.py:83:15-16: `Literal[3]` is not assignable to TypedDict key `ident` with type `str` [typed-dict-key-error] +ERROR typeddicts_readonly_inheritance.py:84:5-7: Missing required key `ident` for TypedDict `User` [typed-dict-key-error] +ERROR typeddicts_readonly_inheritance.py:94:5-6: Class member `F3.a` overrides parent class `F1` in an inconsistent manner [bad-override] """ diff --git a/conformance/results/pyrefly/typeddicts_readonly_kwargs.toml b/conformance/results/pyrefly/typeddicts_readonly_kwargs.toml index 82fa1cd1..7d431830 100644 --- a/conformance/results/pyrefly/typeddicts_readonly_kwargs.toml +++ b/conformance/results/pyrefly/typeddicts_readonly_kwargs.toml @@ -1,6 +1,7 @@ +conformant = "Pass" conformance_automated = "Pass" errors_diff = """ """ output = """ -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/typeddicts_readonly_kwargs.py:33:5-19: Key `key1` in TypedDict `ReadOnlyArgs` is read-only [read-only] +ERROR typeddicts_readonly_kwargs.py:33:5-19: Key `key1` in TypedDict `ReadOnlyArgs` is read-only [read-only] """ diff --git a/conformance/results/pyrefly/typeddicts_readonly_update.toml b/conformance/results/pyrefly/typeddicts_readonly_update.toml index 06d3b760..662d236e 100644 --- a/conformance/results/pyrefly/typeddicts_readonly_update.toml +++ b/conformance/results/pyrefly/typeddicts_readonly_update.toml @@ -1,6 +1,7 @@ +conformant = "Pass" conformance_automated = "Pass" errors_diff = """ """ output = """ -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/typeddicts_readonly_update.py:23:10-14: No matching overload found for function `A.update` [no-matching-overload] +ERROR typeddicts_readonly_update.py:23:10-14: No matching overload found for function `A.update` [no-matching-overload] """ diff --git a/conformance/results/pyrefly/typeddicts_required.toml b/conformance/results/pyrefly/typeddicts_required.toml index 4a23823a..cd9d0280 100644 --- a/conformance/results/pyrefly/typeddicts_required.toml +++ b/conformance/results/pyrefly/typeddicts_required.toml @@ -7,10 +7,10 @@ errors_diff = """ Line 74: Unexpected errors ["Expected a type form, got instance of `Literal['RecursiveMovie']` [not-a-type]"] """ output = """ -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/typeddicts_required.py:12:5-6: `Required` may only be used for TypedDict members [invalid-annotation] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/typeddicts_required.py:19:8-19: `NotRequired` is only allowed inside a class body [invalid-annotation] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/typeddicts_required.py:19:8-24: `NotRequired` is not allowed in this context [invalid-annotation] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/typeddicts_required.py:62:8-31: Duplicate qualifier `Required` [invalid-annotation] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/typeddicts_required.py:63:8-34: Cannot combine `Required` and `NotRequired` for a TypedDict field [invalid-annotation] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/typeddicts_required.py:74:75-91: Expected a type form, got instance of `Literal['RecursiveMovie']` [not-a-type] +ERROR typeddicts_required.py:12:5-6: `Required` may only be used for TypedDict members [invalid-annotation] +ERROR typeddicts_required.py:19:8-19: `NotRequired` is only allowed inside a class body [invalid-annotation] +ERROR typeddicts_required.py:19:8-24: `NotRequired` is not allowed in this context [invalid-annotation] +ERROR typeddicts_required.py:62:8-31: Duplicate qualifier `Required` [invalid-annotation] +ERROR typeddicts_required.py:63:8-34: Cannot combine `Required` and `NotRequired` for a TypedDict field [invalid-annotation] +ERROR typeddicts_required.py:74:75-91: Expected a type form, got instance of `Literal['RecursiveMovie']` [not-a-type] """ diff --git a/conformance/results/pyrefly/typeddicts_type_consistency.toml b/conformance/results/pyrefly/typeddicts_type_consistency.toml index 9ffdbb83..c7812752 100644 --- a/conformance/results/pyrefly/typeddicts_type_consistency.toml +++ b/conformance/results/pyrefly/typeddicts_type_consistency.toml @@ -1,14 +1,15 @@ +conformant = "Pass" conformance_automated = "Pass" errors_diff = """ """ output = """ -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/typeddicts_type_consistency.py:21:10-12: `TypedDict[B1]` is not assignable to `TypedDict[A1]` [bad-assignment] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/typeddicts_type_consistency.py:38:10-12: `TypedDict[B2]` is not assignable to `TypedDict[A2]` [bad-assignment] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/typeddicts_type_consistency.py:65:6-8: `TypedDict[A3]` is not assignable to variable `b3` with type `TypedDict[B3]` [bad-assignment] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/typeddicts_type_consistency.py:69:21-24: Key `y` is not defined in TypedDict `A3` [typed-dict-key-error] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/typeddicts_type_consistency.py:76:22-24: `TypedDict[B3]` is not assignable to `dict[str, int]` [bad-assignment] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/typeddicts_type_consistency.py:77:25-27: `TypedDict[B3]` is not assignable to `dict[str, object]` [bad-assignment] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/typeddicts_type_consistency.py:78:22-24: `TypedDict[B3]` is not assignable to `dict[Any, Any]` [bad-assignment] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/typeddicts_type_consistency.py:82:25-27: `TypedDict[B3]` is not assignable to `Mapping[str, int]` [bad-assignment] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/typeddicts_type_consistency.py:126:56-57: `Literal[1]` is not assignable to TypedDict key `inner_key` with type `str` [typed-dict-key-error] +ERROR typeddicts_type_consistency.py:21:10-12: `TypedDict[B1]` is not assignable to `TypedDict[A1]` [bad-assignment] +ERROR typeddicts_type_consistency.py:38:10-12: `TypedDict[B2]` is not assignable to `TypedDict[A2]` [bad-assignment] +ERROR typeddicts_type_consistency.py:65:6-8: `TypedDict[A3]` is not assignable to variable `b3` with type `TypedDict[B3]` [bad-assignment] +ERROR typeddicts_type_consistency.py:69:21-24: Key `y` is not defined in TypedDict `A3` [typed-dict-key-error] +ERROR typeddicts_type_consistency.py:76:22-24: `TypedDict[B3]` is not assignable to `dict[str, int]` [bad-assignment] +ERROR typeddicts_type_consistency.py:77:25-27: `TypedDict[B3]` is not assignable to `dict[str, object]` [bad-assignment] +ERROR typeddicts_type_consistency.py:78:22-24: `TypedDict[B3]` is not assignable to `dict[Any, Any]` [bad-assignment] +ERROR typeddicts_type_consistency.py:82:25-27: `TypedDict[B3]` is not assignable to `Mapping[str, int]` [bad-assignment] +ERROR typeddicts_type_consistency.py:126:56-57: `Literal[1]` is not assignable to TypedDict key `inner_key` with type `str` [typed-dict-key-error] """ diff --git a/conformance/results/pyrefly/typeddicts_usage.toml b/conformance/results/pyrefly/typeddicts_usage.toml index 4688e8ed..45500ced 100644 --- a/conformance/results/pyrefly/typeddicts_usage.toml +++ b/conformance/results/pyrefly/typeddicts_usage.toml @@ -1,11 +1,12 @@ +conformant = "Pass" conformance_automated = "Pass" errors_diff = """ """ output = """ -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/typeddicts_usage.py:23:7-17: TypedDict `Movie` does not have key `director` [typed-dict-key-error] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/typeddicts_usage.py:24:17-23: `Literal['1982']` is not assignable to TypedDict key `year` with type `int` [typed-dict-key-error] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/typeddicts_usage.py:28:17-56: Missing required key `name` for TypedDict `Movie` [typed-dict-key-error] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/typeddicts_usage.py:28:18-25: Key `title` is not defined in TypedDict `Movie` [typed-dict-key-error] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/typeddicts_usage.py:35:22-27: TypedDict `Movie` not allowed as second argument to isinstance() [invalid-argument] -ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/typeddicts_usage.py:40:24-33: `TypedDict` is not allowed in this context [invalid-annotation] +ERROR typeddicts_usage.py:23:7-17: TypedDict `Movie` does not have key `director` [typed-dict-key-error] +ERROR typeddicts_usage.py:24:17-23: `Literal['1982']` is not assignable to TypedDict key `year` with type `int` [typed-dict-key-error] +ERROR typeddicts_usage.py:28:17-56: Missing required key `name` for TypedDict `Movie` [typed-dict-key-error] +ERROR typeddicts_usage.py:28:18-25: Key `title` is not defined in TypedDict `Movie` [typed-dict-key-error] +ERROR typeddicts_usage.py:35:22-27: TypedDict `Movie` not allowed as second argument to isinstance() [invalid-argument] +ERROR typeddicts_usage.py:40:24-33: `TypedDict` is not allowed in this context [invalid-annotation] """ diff --git a/conformance/results/results.html b/conformance/results/results.html index 7e0de678..5805ee71 100644 --- a/conformance/results/results.html +++ b/conformance/results/results.html @@ -77,7 +77,7 @@ } .col2 { - width: 18%; + width: 14%; cursor: pointer; text-align: center; } diff --git a/conformance/src/results_template.html b/conformance/src/results_template.html index 2e9b95f3..cd548256 100644 --- a/conformance/src/results_template.html +++ b/conformance/src/results_template.html @@ -77,7 +77,7 @@ } .col2 { - width: 18%; + width: 14%; cursor: pointer; text-align: center; } diff --git a/conformance/src/type_checker.py b/conformance/src/type_checker.py index 26b61e46..6bd69f9e 100644 --- a/conformance/src/type_checker.py +++ b/conformance/src/type_checker.py @@ -364,7 +364,12 @@ def get_version(self) -> str: return version def run_tests(self, test_files: Sequence[str]) -> dict[str, str]: - proc = run(["pyrefly", "check", "--output-format", "min-text", "--no-summary"], stdout=PIPE, text=True, encoding="utf-8") + proc = run( + ["pyrefly", "check", "--output-format", "min-text", "--no-summary"], + stdout=PIPE, + text=True, + encoding="utf-8", + ) lines = proc.stdout.split("\n") # Add results to a dictionary keyed by the file name. @@ -372,8 +377,23 @@ def run_tests(self, test_files: Sequence[str]) -> dict[str, str]: for line in lines: if not line.strip(): continue - file_name = line.split(":")[0].split(" ")[1].split("conformance/tests/")[-1].strip() - results_dict[file_name] = results_dict.get(file_name, "") + line + "\n" + # Extract the absolute path reported by pyrefly and convert it to a + # stable relative path (filename only) so results are consistent. + # Example input line: + # "ERROR /abs/.../conformance/tests/foo.py:12:3-5: message [code]" + # We replace the absolute path with just "foo.py". + try: + abs_path = line.split(":", 1)[0].split(" ", 1)[1].strip() + except IndexError: + # If parsing fails, fall back to original line and grouping. + abs_path = "" + file_name = Path(abs_path).name if abs_path else line.split(":")[0] + + # Replace only the first occurrence to avoid touching the message text. + display_line = line.replace(abs_path, file_name, 1) if abs_path else line + results_dict[file_name] = ( + results_dict.get(file_name, "") + display_line + "\n" + ) return results_dict