You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: conformance/results/mypy/qualifiers_annotated.toml
+24-24Lines changed: 24 additions & 24 deletions
Original file line number
Diff line number
Diff line change
@@ -7,33 +7,33 @@ Does not reject type[T] compatibility for type alias defined with Annotated.
7
7
Does not reject call of type alias defined with Annotated.
8
8
"""
9
9
output = """
10
-
qualifiers_annotated.py:43: error: Bracketed expression "[...]" is not valid as a type [valid-type]
11
-
qualifiers_annotated.py:44: error: Syntax error in type annotation [syntax]
12
-
qualifiers_annotated.py:44: note: Suggestion: Is there a spurious trailing comma?
13
-
qualifiers_annotated.py:45: error: Invalid type comment or annotation [valid-type]
14
-
qualifiers_annotated.py:46: error: Inline TypedDict is experimental, must be enabled with --enable-incomplete-feature=InlineTypedDict [misc]
15
-
qualifiers_annotated.py:46: error: Name "b" is not defined [name-defined]
16
-
qualifiers_annotated.py:47: error: Invalid type comment or annotation [valid-type]
10
+
qualifiers_annotated.py:38: error: Bracketed expression "[...]" is not valid as a type [valid-type]
11
+
qualifiers_annotated.py:39: error: Syntax error in type annotation [syntax]
12
+
qualifiers_annotated.py:39: note: Suggestion: Is there a spurious trailing comma?
13
+
qualifiers_annotated.py:40: error: Invalid type comment or annotation [valid-type]
14
+
qualifiers_annotated.py:41: error: Inline TypedDict is experimental, must be enabled with --enable-incomplete-feature=InlineTypedDict [misc]
15
+
qualifiers_annotated.py:41: error: Name "b" is not defined [name-defined]
16
+
qualifiers_annotated.py:42: error: Invalid type comment or annotation [valid-type]
17
+
qualifiers_annotated.py:43: error: Invalid type comment or annotation [valid-type]
18
+
qualifiers_annotated.py:44: error: Invalid type comment or annotation [valid-type]
19
+
qualifiers_annotated.py:45: error: Name "var1" is not defined [name-defined]
20
+
qualifiers_annotated.py:46: error: Invalid type: try using Literal[True] instead? [valid-type]
21
+
qualifiers_annotated.py:47: error: Invalid type: try using Literal[1] instead? [valid-type]
17
22
qualifiers_annotated.py:48: error: Invalid type comment or annotation [valid-type]
18
23
qualifiers_annotated.py:49: error: Invalid type comment or annotation [valid-type]
19
-
qualifiers_annotated.py:50: error: Name "var1" is not defined [name-defined]
20
-
qualifiers_annotated.py:51: error: Invalid type: try using Literal[True] instead? [valid-type]
21
-
qualifiers_annotated.py:52: error: Invalid type: try using Literal[1] instead? [valid-type]
22
-
qualifiers_annotated.py:53: error: Invalid type comment or annotation [valid-type]
23
-
qualifiers_annotated.py:54: error: Invalid type comment or annotation [valid-type]
24
-
qualifiers_annotated.py:64: error: Annotated[...] must have exactly one type argument and at least one annotation [valid-type]
25
-
qualifiers_annotated.py:76: error: Incompatible types in assignment (expression has type "<typing special form>", variable has type "type[Any]") [assignment]
26
-
qualifiers_annotated.py:84: error: Argument 1 to "func4" has incompatible type "<typing special form>"; expected "type[Never]" [arg-type]
27
-
qualifiers_annotated.py:91: error: "<typing special form>" not callable [operator]
28
-
qualifiers_annotated.py:92: error: "<typing special form>" not callable [operator]
29
-
qualifiers_annotated.py:98: error: Invalid type: ClassVar nested inside other type [valid-type]
30
-
qualifiers_annotated.py:100: error: Final can be only used as an outermost qualifier in a variable annotation [valid-type]
24
+
qualifiers_annotated.py:59: error: Annotated[...] must have exactly one type argument and at least one annotation [valid-type]
25
+
qualifiers_annotated.py:71: error: Incompatible types in assignment (expression has type "<typing special form>", variable has type "type[Any]") [assignment]
26
+
qualifiers_annotated.py:79: error: Argument 1 to "func4" has incompatible type "<typing special form>"; expected "type[Never]" [arg-type]
27
+
qualifiers_annotated.py:86: error: "<typing special form>" not callable [operator]
28
+
qualifiers_annotated.py:87: error: "<typing special form>" not callable [operator]
29
+
qualifiers_annotated.py:93: error: Invalid type: ClassVar nested inside other type [valid-type]
30
+
qualifiers_annotated.py:95: error: Final can be only used as an outermost qualifier in a variable annotation [valid-type]
31
31
"""
32
32
conformance_automated = "Fail"
33
33
errors_diff = """
34
-
Line 77: Expected 1 errors
35
-
Line 85: Expected 1 errors
36
-
Line 93: Expected 1 errors
37
-
Line 98: Unexpected errors ['qualifiers_annotated.py:98: error: Invalid type: ClassVar nested inside other type [valid-type]']
38
-
Line 100: Unexpected errors ['qualifiers_annotated.py:100: error: Final can be only used as an outermost qualifier in a variable annotation [valid-type]']
34
+
Line 72: Expected 1 errors
35
+
Line 80: Expected 1 errors
36
+
Line 88: Expected 1 errors
37
+
Line 93: Unexpected errors ['qualifiers_annotated.py:93: error: Invalid type: ClassVar nested inside other type [valid-type]']
38
+
Line 95: Unexpected errors ['qualifiers_annotated.py:95: error: Final can be only used as an outermost qualifier in a variable annotation [valid-type]']
Copy file name to clipboardExpand all lines: conformance/results/pyre/qualifiers_annotated.toml
+24-24Lines changed: 24 additions & 24 deletions
Original file line number
Diff line number
Diff line change
@@ -4,31 +4,31 @@ Does not reject Annotated with a single parameter.
4
4
Does not reject call of Annotated with no type arguments.
5
5
"""
6
6
output = """
7
-
qualifiers_annotated.py:43:6 Undefined or invalid type [11]: Annotation `` is not defined as a type.
8
-
qualifiers_annotated.py:44:6 Invalid type [31]: Expression `typing.Annotated[(((int, str)), "")]` is not a valid type.
9
-
qualifiers_annotated.py:45:6 Invalid type [31]: Expression `typing.Annotated[(comprehension(int for generators(generator(i in range(1) if ))), "")]` is not a valid type.
10
-
qualifiers_annotated.py:46:6 Invalid type [31]: Expression `typing.Annotated[({ "a":"b" }, "")]` is not a valid type.
11
-
qualifiers_annotated.py:47:6 Invalid type [31]: Expression `typing.Annotated[(lambda () (int)(), "")]` is not a valid type.
12
-
qualifiers_annotated.py:48:6 Invalid type [31]: Expression `typing.Annotated[([int][0], "")]` is not a valid type.
13
-
qualifiers_annotated.py:49:6 Invalid type [31]: Expression `typing.Annotated[(int if 1 < 3 else str, "")]` is not a valid type.
14
-
qualifiers_annotated.py:50:16 Unbound name [10]: Name `var1` is used but not defined in the current scope.
15
-
qualifiers_annotated.py:51:6 Invalid type [31]: Expression `typing.Annotated[(True, "")]` is not a valid type.
16
-
qualifiers_annotated.py:52:7 Invalid type [31]: Expression `typing.Annotated[(1, "")]` is not a valid type.
17
-
qualifiers_annotated.py:53:7 Invalid type [31]: Expression `typing.Annotated[(list or set, "")]` is not a valid type.
18
-
qualifiers_annotated.py:54:7 Invalid type [31]: Expression `typing.Annotated[(f"{"int"}", "")]` is not a valid type.
19
-
qualifiers_annotated.py:64:7 Invalid type parameters [24]: Generic type `Annotated` expects at least 2 type parameters, received 1.
20
-
qualifiers_annotated.py:77:0 Incompatible variable type [9]: not_type2 is declared to have type `Type[typing.Any]` but is used as type `TypeAlias`.
21
-
qualifiers_annotated.py:85:6 Incompatible parameter type [6]: In call `func4`, for 1st positional argument, expected `Type[Variable[T]]` but got `TypeAlias`.
22
-
qualifiers_annotated.py:91:0 Invalid class instantiation [45]: `Annotated` cannot be instantiated.
23
-
qualifiers_annotated.py:93:0 Call error [29]: `TypeAlias` is not a function.
24
-
qualifiers_annotated.py:105:4 Undefined attribute [16]: `typing.Type` has no attribute `a`.
25
-
qualifiers_annotated.py:106:4 Undefined attribute [16]: `typing.Type` has no attribute `b`.
7
+
qualifiers_annotated.py:38:6 Undefined or invalid type [11]: Annotation `` is not defined as a type.
8
+
qualifiers_annotated.py:39:6 Invalid type [31]: Expression `typing.Annotated[(((int, str)), "")]` is not a valid type.
9
+
qualifiers_annotated.py:40:6 Invalid type [31]: Expression `typing.Annotated[(comprehension(int for generators(generator(i in range(1) if ))), "")]` is not a valid type.
10
+
qualifiers_annotated.py:41:6 Invalid type [31]: Expression `typing.Annotated[({ "a":"b" }, "")]` is not a valid type.
11
+
qualifiers_annotated.py:42:6 Invalid type [31]: Expression `typing.Annotated[(lambda () (int)(), "")]` is not a valid type.
12
+
qualifiers_annotated.py:43:6 Invalid type [31]: Expression `typing.Annotated[([int][0], "")]` is not a valid type.
13
+
qualifiers_annotated.py:44:6 Invalid type [31]: Expression `typing.Annotated[(int if 1 < 3 else str, "")]` is not a valid type.
14
+
qualifiers_annotated.py:45:16 Unbound name [10]: Name `var1` is used but not defined in the current scope.
15
+
qualifiers_annotated.py:46:6 Invalid type [31]: Expression `typing.Annotated[(True, "")]` is not a valid type.
16
+
qualifiers_annotated.py:47:7 Invalid type [31]: Expression `typing.Annotated[(1, "")]` is not a valid type.
17
+
qualifiers_annotated.py:48:7 Invalid type [31]: Expression `typing.Annotated[(list or set, "")]` is not a valid type.
18
+
qualifiers_annotated.py:49:7 Invalid type [31]: Expression `typing.Annotated[(f"{"int"}", "")]` is not a valid type.
19
+
qualifiers_annotated.py:59:7 Invalid type parameters [24]: Generic type `Annotated` expects at least 2 type parameters, received 1.
20
+
qualifiers_annotated.py:72:0 Incompatible variable type [9]: not_type2 is declared to have type `Type[typing.Any]` but is used as type `TypeAlias`.
21
+
qualifiers_annotated.py:80:6 Incompatible parameter type [6]: In call `func4`, for 1st positional argument, expected `Type[Variable[T]]` but got `TypeAlias`.
22
+
qualifiers_annotated.py:86:0 Invalid class instantiation [45]: `Annotated` cannot be instantiated.
23
+
qualifiers_annotated.py:88:0 Call error [29]: `TypeAlias` is not a function.
24
+
qualifiers_annotated.py:100:4 Undefined attribute [16]: `typing.Type` has no attribute `a`.
25
+
qualifiers_annotated.py:101:4 Undefined attribute [16]: `typing.Type` has no attribute `b`.
26
26
"""
27
27
conformance_automated = "Fail"
28
28
errors_diff = """
29
-
Line 76: Expected 1 errors
30
-
Line 84: Expected 1 errors
31
-
Line 92: Expected 1 errors
32
-
Line 105: Unexpected errors ['qualifiers_annotated.py:105:4 Undefined attribute [16]: `typing.Type` has no attribute `a`.']
33
-
Line 106: Unexpected errors ['qualifiers_annotated.py:106:4 Undefined attribute [16]: `typing.Type` has no attribute `b`.']
29
+
Line 71: Expected 1 errors
30
+
Line 79: Expected 1 errors
31
+
Line 87: Expected 1 errors
32
+
Line 100: Unexpected errors ['qualifiers_annotated.py:100:4 Undefined attribute [16]: `typing.Type` has no attribute `a`.']
33
+
Line 101: Unexpected errors ['qualifiers_annotated.py:101:4 Undefined attribute [16]: `typing.Type` has no attribute `b`.']
0 commit comments