Skip to content

Commit 6597281

Browse files
committed
Added code to change pyrefly diagnostics to be recorded in the results as relative paths rather than absolute. Fixed the summary report so it looks better with five columns.
1 parent f2f4c40 commit 6597281

File tree

140 files changed

+1155
-1039
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

140 files changed

+1155
-1039
lines changed
Lines changed: 24 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,29 @@
1+
conformant = "Pass"
12
conformance_automated = "Pass"
23
errors_diff = """
34
"""
45
output = """
5-
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]
6-
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]
7-
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]
8-
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]
9-
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]
10-
ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/aliases_explicit.py:79:21-61: function call cannot be used in annotations [invalid-annotation]
11-
ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/aliases_explicit.py:80:21-31: list literal cannot be used in annotations [invalid-annotation]
12-
ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/aliases_explicit.py:81:21-34: tuple literal cannot be used in annotations [invalid-annotation]
13-
ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/aliases_explicit.py:82:21-44: list comprehension cannot be used in annotations [invalid-annotation]
14-
ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/aliases_explicit.py:83:21-31: dict literal cannot be used in annotations [invalid-annotation]
15-
ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/aliases_explicit.py:83:23-24: Could not find name `a` [unknown-name]
16-
ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/aliases_explicit.py:83:28-29: Could not find name `b` [unknown-name]
17-
ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/aliases_explicit.py:84:21-36: function call cannot be used in annotations [invalid-annotation]
18-
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]
19-
ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/aliases_explicit.py:86:21-42: if expression cannot be used in annotations [invalid-annotation]
20-
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]
21-
ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/aliases_explicit.py:88:22-26: bool literal cannot be used in annotations [invalid-annotation]
22-
ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/aliases_explicit.py:89:22-23: number literal cannot be used in annotations [invalid-annotation]
23-
ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/aliases_explicit.py:90:22-33: boolean operation cannot be used in annotations [invalid-annotation]
24-
ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/aliases_explicit.py:91:22-32: f-string cannot be used in annotations [invalid-annotation]
25-
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]
26-
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]
27-
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]
6+
ERROR aliases_explicit.py:67:9-28: `TypeAlias[GoodTypeAlias2, type[int | None]]` is not subscriptable [unsupported-operation]
7+
ERROR aliases_explicit.py:68:9-28: `TypeAlias[GoodTypeAlias3, type[list[int | None]]]` is not subscriptable [unsupported-operation]
8+
ERROR aliases_explicit.py:69:9-33: Expected 1 type argument for `GoodTypeAlias4`, got 2 [bad-specialization]
9+
ERROR aliases_explicit.py:70:9-33: Expected 1 type argument for `GoodTypeAlias8`, got 2 [bad-specialization]
10+
ERROR aliases_explicit.py:71:9-33: Expected a valid ParamSpec expression, got `int` [invalid-param-spec]
11+
ERROR aliases_explicit.py:79:21-61: function call cannot be used in annotations [invalid-annotation]
12+
ERROR aliases_explicit.py:80:21-31: list literal cannot be used in annotations [invalid-annotation]
13+
ERROR aliases_explicit.py:81:21-34: tuple literal cannot be used in annotations [invalid-annotation]
14+
ERROR aliases_explicit.py:82:21-44: list comprehension cannot be used in annotations [invalid-annotation]
15+
ERROR aliases_explicit.py:83:21-31: dict literal cannot be used in annotations [invalid-annotation]
16+
ERROR aliases_explicit.py:83:23-24: Could not find name `a` [unknown-name]
17+
ERROR aliases_explicit.py:83:28-29: Could not find name `b` [unknown-name]
18+
ERROR aliases_explicit.py:84:21-36: function call cannot be used in annotations [invalid-annotation]
19+
ERROR aliases_explicit.py:85:21-29: invalid subscript expression cannot be used in annotations [invalid-annotation]
20+
ERROR aliases_explicit.py:86:21-42: if expression cannot be used in annotations [invalid-annotation]
21+
ERROR aliases_explicit.py:87:21-25: Expected `BadTypeAlias9` to be a type alias, got `Literal[3]` [type-alias-error]
22+
ERROR aliases_explicit.py:88:22-26: bool literal cannot be used in annotations [invalid-annotation]
23+
ERROR aliases_explicit.py:89:22-23: number literal cannot be used in annotations [invalid-annotation]
24+
ERROR aliases_explicit.py:90:22-33: boolean operation cannot be used in annotations [invalid-annotation]
25+
ERROR aliases_explicit.py:91:22-32: f-string cannot be used in annotations [invalid-annotation]
26+
ERROR aliases_explicit.py:100:5-19: `TypeAlias[ListAlias, type[list[Unknown]]]` is not subscriptable [unsupported-operation]
27+
ERROR aliases_explicit.py:101:6-20: Expected a callable, got TypeAlias[ListOrSetAlias, type[list[Unknown] | set[Unknown]]] [not-callable]
28+
ERROR aliases_explicit.py:102:5-24: `TypeAlias[ListOrSetAlias, type[list[Unknown] | set[Unknown]]]` is not subscriptable [unsupported-operation]
2829
"""

conformance/results/pyrefly/aliases_implicit.toml

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -11,21 +11,21 @@ Line 113: Expected 1 errors
1111
Line 117: Expected 1 errors
1212
"""
1313
output = """
14-
ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/aliases_implicit.py:76:9-28: `type[int | None]` is not subscriptable [unsupported-operation]
15-
ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/aliases_implicit.py:77:9-28: `type[list[int | None]]` is not subscriptable [unsupported-operation]
16-
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]
17-
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]
18-
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]
19-
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]
20-
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]
21-
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]
22-
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]
23-
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]
24-
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]
25-
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]
26-
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]
27-
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]
28-
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]
29-
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]
30-
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]
14+
ERROR aliases_implicit.py:76:9-28: `type[int | None]` is not subscriptable [unsupported-operation]
15+
ERROR aliases_implicit.py:77:9-28: `type[list[int | None]]` is not subscriptable [unsupported-operation]
16+
ERROR aliases_implicit.py:78:9-33: Expected 1 type argument for `GoodTypeAlias4`, got 2 [bad-specialization]
17+
ERROR aliases_implicit.py:79:9-33: Expected 1 type argument for `GoodTypeAlias8`, got 2 [bad-specialization]
18+
ERROR aliases_implicit.py:80:9-33: Expected a valid ParamSpec expression, got `int` [invalid-param-spec]
19+
ERROR aliases_implicit.py:81:9-29: Type `str` is not assignable to upper bound `float` of type variable `TFloat` [bad-specialization]
20+
ERROR aliases_implicit.py:107:9-22: Expected a type form, got instance of `list[type[int] | type[str]]` [not-a-type]
21+
ERROR aliases_implicit.py:108:9-22: Expected a type form, got instance of `tuple[tuple[type[int], type[str]]]` [not-a-type]
22+
ERROR aliases_implicit.py:109:9-22: Expected a type form, got instance of `list[type[int]]` [not-a-type]
23+
ERROR aliases_implicit.py:110:9-22: Expected a type form, got instance of `dict[str, str]` [not-a-type]
24+
ERROR aliases_implicit.py:114:9-22: Expected a type form, got instance of `Literal[3]` [not-a-type]
25+
ERROR aliases_implicit.py:115:10-24: Expected a type form, got instance of `Literal[True]` [not-a-type]
26+
ERROR aliases_implicit.py:116:10-24: Expected a type form, got instance of `Literal[1]` [not-a-type]
27+
ERROR aliases_implicit.py:118:10-24: Expected a type form, got instance of `Literal['int']` [not-a-type]
28+
ERROR aliases_implicit.py:119:10-24: Expected a type form, got instance of `Literal['int | str']` [not-a-type]
29+
ERROR aliases_implicit.py:133:6-20: Expected a callable, got type[list[Unknown] | set[Unknown]] [not-callable]
30+
ERROR aliases_implicit.py:135:5-24: `type[list[Unknown] | set[Unknown]]` is not subscriptable [unsupported-operation]
3131
"""
Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,20 @@
1+
conformant = "Pass"
12
conformance_automated = "Pass"
23
errors_diff = """
34
"""
45
output = """
5-
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]
6-
ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/aliases_newtype.py:12:14-16: `Literal[42]` is not assignable to `UserId` [bad-assignment]
7-
ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/aliases_newtype.py:18:11-17: `type[UserId]` is not assignable to `type` [bad-assignment]
8-
ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/aliases_newtype.py:23:16-22: NewType `UserId` not allowed in isinstance() [invalid-argument]
9-
ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/aliases_newtype.py:26:21-27: Subclassing a NewType not allowed [invalid-inheritance]
10-
ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/aliases_newtype.py:35:20-29: Expected string literal "GoodName" [invalid-argument]
11-
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]
12-
ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/aliases_newtype.py:47:38-47: Second argument to NewType is invalid [invalid-argument]
13-
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]
14-
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]
15-
ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/aliases_newtype.py:54:38-48: Second argument to NewType is invalid [invalid-argument]
16-
ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/aliases_newtype.py:61:38-41: Second argument to NewType is invalid [invalid-argument]
17-
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]
18-
ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/aliases_newtype.py:65:38-41: Second argument to NewType is invalid [invalid-argument]
6+
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]
7+
ERROR aliases_newtype.py:12:14-16: `Literal[42]` is not assignable to `UserId` [bad-assignment]
8+
ERROR aliases_newtype.py:18:11-17: `type[UserId]` is not assignable to `type` [bad-assignment]
9+
ERROR aliases_newtype.py:23:16-22: NewType `UserId` not allowed in isinstance() [invalid-argument]
10+
ERROR aliases_newtype.py:26:21-27: Subclassing a NewType not allowed [invalid-inheritance]
11+
ERROR aliases_newtype.py:35:20-29: Expected string literal "GoodName" [invalid-argument]
12+
ERROR aliases_newtype.py:41:6-23: Expected 0 type arguments for `GoodNewType1`, got 1 [bad-specialization]
13+
ERROR aliases_newtype.py:47:38-47: Second argument to NewType is invalid [invalid-argument]
14+
ERROR aliases_newtype.py:50:38-45: Second argument to NewType cannot be an unbound generic [invalid-argument]
15+
ERROR aliases_newtype.py:52:38-46: Second argument to NewType cannot be a protocol [invalid-argument]
16+
ERROR aliases_newtype.py:54:38-48: Second argument to NewType is invalid [invalid-argument]
17+
ERROR aliases_newtype.py:61:38-41: Second argument to NewType is invalid [invalid-argument]
18+
ERROR aliases_newtype.py:63:43-46: Expected 2 positional arguments, got 3 in function `typing.NewType.__init__` [bad-argument-count]
19+
ERROR aliases_newtype.py:65:38-41: Second argument to NewType is invalid [invalid-argument]
1920
"""

conformance/results/pyrefly/aliases_recursive.toml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,14 @@ Line 67: Unexpected errors ['`type[list[Unknown]]` is not subscriptable [unsuppo
2020
Line 68: Unexpected errors ['`type[list[Unknown]]` is not subscriptable [unsupported-operation]']
2121
"""
2222
output = """
23-
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]
24-
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]
25-
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]
26-
ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/aliases_recursive.py:59:25-47: `type[list[Unknown]]` is not subscriptable [unsupported-operation]
27-
ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/aliases_recursive.py:62:5-27: `type[list[Unknown]]` is not subscriptable [unsupported-operation]
28-
ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/aliases_recursive.py:63:5-27: `type[list[Unknown]]` is not subscriptable [unsupported-operation]
29-
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]
30-
ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/aliases_recursive.py:67:5-32: `type[list[Unknown]]` is not subscriptable [unsupported-operation]
31-
ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/aliases_recursive.py:68:5-34: `type[list[Unknown]]` is not subscriptable [unsupported-operation]
32-
ERROR /Users/dannyyang/Documents/Documents/GitHub/typing/conformance/tests/aliases_recursive.py:69:5-32: `type[list[Unknown]]` is not subscriptable [unsupported-operation]
23+
ERROR aliases_recursive.py:30:36-52: Expected a type form, got instance of `Literal['RecursiveTuple']` [not-a-type]
24+
ERROR aliases_recursive.py:42:45-63: Expected a type form, got instance of `Literal['RecursiveMapping']` [not-a-type]
25+
ERROR aliases_recursive.py:58:26-54: Expected a type form, got instance of `_SpecialForm` [not-a-type]
26+
ERROR aliases_recursive.py:59:25-47: `type[list[Unknown]]` is not subscriptable [unsupported-operation]
27+
ERROR aliases_recursive.py:62:5-27: `type[list[Unknown]]` is not subscriptable [unsupported-operation]
28+
ERROR aliases_recursive.py:63:5-27: `type[list[Unknown]]` is not subscriptable [unsupported-operation]
29+
ERROR aliases_recursive.py:65:26-63: Expected a type form, got instance of `_SpecialForm` [not-a-type]
30+
ERROR aliases_recursive.py:67:5-32: `type[list[Unknown]]` is not subscriptable [unsupported-operation]
31+
ERROR aliases_recursive.py:68:5-34: `type[list[Unknown]]` is not subscriptable [unsupported-operation]
32+
ERROR aliases_recursive.py:69:5-32: `type[list[Unknown]]` is not subscriptable [unsupported-operation]
3333
"""

0 commit comments

Comments
 (0)