forked from python/typing
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathannotations_generators.toml
More file actions
26 lines (26 loc) · 2.2 KB
/
Copy pathannotations_generators.toml
File metadata and controls
26 lines (26 loc) · 2.2 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
conformant = "Partial"
notes = """
Does not detect that invalid yield is unreachable
"""
conformance_automated = "Fail"
errors_diff = """
Line 140: Unexpected errors ['This `yield` expression is unreachable [unreachable]']
Line 145: Unexpected errors ['This `yield` expression is unreachable [unreachable]']
Line 190: Unexpected errors ['This `yield` expression is unreachable [unreachable]']
"""
output = """
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: Yielded type `Literal[3]` is not assignable to declared yield type `A` [invalid-yield]
ERROR annotations_generators.py:66:15-16: Yielded type `Literal[3]` is not assignable to declared yield 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: Yielded type `B` is not assignable to declared yield 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 `Generator[A, None, None]`, which is not assignable to declared return type `Generator[B, None, Unknown]` [invalid-yield]
ERROR annotations_generators.py:119:5-19: Cannot yield from `Generator[int, None, None]`, which is not assignable to declared return type `Generator[B, None, Unknown]` [invalid-yield]
ERROR annotations_generators.py:135:5-29: Cannot yield from `Generator[None, int, None]`, which is not assignable to declared return type `Generator[None, str, Unknown]` [invalid-yield]
ERROR annotations_generators.py:140:5-13: This `yield` expression is unreachable [unreachable]
ERROR annotations_generators.py:145:5-13: This `yield` expression is unreachable [unreachable]
ERROR annotations_generators.py:190:5-12: This `yield` expression is unreachable [unreachable]
"""