-
Notifications
You must be signed in to change notification settings - Fork 293
Expand file tree
/
Copy pathaliases_implicit.toml
More file actions
32 lines (32 loc) · 2.54 KB
/
aliases_implicit.toml
File metadata and controls
32 lines (32 loc) · 2.54 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
conformance_automated = "Fail"
conformant = "Partial"
notes = """
Does not reject variables with `Any` or `Unknown` types when used as implicit type aliases.
Falls short on full syntactic validation of type aliases.
"""
errors_diff = """
Line 106: Expected 1 errors
Line 111: Expected 1 errors
Line 112: Expected 1 errors
Line 113: Expected 1 errors
Line 117: Expected 1 errors
"""
output = """
aliases_implicit.py:76:9: error[not-subscriptable] Cannot subscript non-generic type `<types.UnionType special-form 'int | None'>`
aliases_implicit.py:77:9: error[not-subscriptable] Cannot subscript non-generic type `<class 'list[int | None]'>`
aliases_implicit.py:78:29: error[invalid-type-arguments] Too many type arguments: expected 1, got 2
aliases_implicit.py:79:29: error[invalid-type-arguments] Too many type arguments: expected 1, got 2
aliases_implicit.py:80:24: error[invalid-type-arguments] Type argument for `ParamSpec` must be either a list of types, `ParamSpec`, `Concatenate`, or `...`
aliases_implicit.py:81:25: error[invalid-type-arguments] Type `str` is not assignable to upper bound `int | float` of type variable `TFloat@GoodTypeAlias12`
aliases_implicit.py:107:9: error[invalid-type-form] Variable of type `list[<class 'int'> | <class 'str'>]` is not allowed in a parameter annotation
aliases_implicit.py:108:9: error[invalid-type-form] Variable of type `tuple[tuple[<class 'int'>, <class 'str'>]]` is not allowed in a parameter annotation
aliases_implicit.py:109:9: error[invalid-type-form] Variable of type `list[<class 'int'>]` is not allowed in a parameter annotation
aliases_implicit.py:110:9: error[invalid-type-form] Variable of type `dict[str, str]` is not allowed in a parameter annotation
aliases_implicit.py:114:9: error[invalid-type-form] Variable of type `Literal[3]` is not allowed in a parameter annotation
aliases_implicit.py:115:10: error[invalid-type-form] Variable of type `Literal[True]` is not allowed in a parameter annotation
aliases_implicit.py:116:10: error[invalid-type-form] Variable of type `Literal[1]` is not allowed in a parameter annotation
aliases_implicit.py:118:10: error[invalid-type-form] Variable of type `Literal["int"]` is not allowed in a parameter annotation
aliases_implicit.py:119:10: error[invalid-type-form] Variable of type `Literal["int | str"]` is not allowed in a parameter annotation
aliases_implicit.py:133:6: error[call-non-callable] Object of type `UnionType` is not callable
aliases_implicit.py:135:5: error[not-subscriptable] Cannot subscript non-generic type `<types.UnionType special-form 'list[Unknown] | set[Unknown]'>`
"""