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

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 24 additions & 23 deletions conformance/results/pyrefly/aliases_explicit.toml
Original file line number Diff line number Diff line change
@@ -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]
"""
34 changes: 17 additions & 17 deletions conformance/results/pyrefly/aliases_implicit.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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]
"""
29 changes: 15 additions & 14 deletions conformance/results/pyrefly/aliases_newtype.toml
Original file line number Diff line number Diff line change
@@ -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]
"""
20 changes: 10 additions & 10 deletions conformance/results/pyrefly/aliases_recursive.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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]
"""
Loading