File tree 2 files changed +3
-3
lines changed 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change 30
30
INVALID_EXCEPTION = 'Exception must be derived from BaseException'
31
31
INVALID_EXCEPTION_TYPE = 'Exception type must be derived from BaseException'
32
32
INVALID_RETURN_TYPE_FOR_YIELD = \
33
- 'The return type of a generator function should be "Generator" or a supertype thereof '
33
+ 'The return type of a generator function should be "Generator" or one of its supertypes '
34
34
INVALID_RETURN_TYPE_FOR_YIELD_FROM = \
35
35
'Iterable function return type expected for "yield from"'
36
36
INCOMPATIBLE_TYPES = 'Incompatible types'
Original file line number Diff line number Diff line change @@ -676,7 +676,7 @@ def f() -> Any:
676
676
[case testYieldInFunctionReturningFunction]
677
677
from typing import Callable
678
678
def f() -> Callable[[], None]:
679
- yield object() # E: The return type of a generator function should be "Generator" or a supertype thereof
679
+ yield object() # E: The return type of a generator function should be "Generator" or one of its supertypes
680
680
[out]
681
681
main: note: In function "f":
682
682
@@ -688,7 +688,7 @@ def f():
688
688
[case testWithInvalidInstanceReturnType]
689
689
import typing
690
690
def f() -> int:
691
- yield 1 # E: The return type of a generator function should be "Generator" or a supertype thereof
691
+ yield 1 # E: The return type of a generator function should be "Generator" or one of its supertypes
692
692
[builtins fixtures/for.py]
693
693
[out]
694
694
main: note: In function "f":
You can’t perform that action at this time.
0 commit comments