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
// Here we should probably use an equivalent of "canBeOrExtend" (accepting uncertainty) instead of "mustBeOrExtend"
72
-
if (ITERABLE_TYPES.stream().anyMatch(declaredReturnType::mustBeOrExtend)) {
75
+
if (ITERABLE_TYPES.stream().anyMatch(declaredReturnType::mustBeOrExtend) || ASYNC_ITERABLE_TYPES.stream().anyMatch(declaredReturnType::mustBeOrExtend)) {
76
+
if (isMixedUpAnnotation(isAsyncFunction, declaredReturnType)) {
77
+
returnTypeVisitor.yieldStatements
78
+
.forEach(y -> {
79
+
PreciseIssueissue =
80
+
ctx.addIssue(y, String.format("Annotate function \"%s\" with \"%s\" or one of its supertypes.", functionName, recommendedSuperType));
81
+
addSecondaries(issue, functionDef);
82
+
});
83
+
}
73
84
return;
74
85
}
75
86
returnTypeVisitor.yieldStatements
76
87
.forEach(y -> {
77
88
PreciseIssueissue =
78
-
ctx.addIssue(y, String.format("Remove this yield statement or annotate function \"%s\" with \"typing.Generator\" or one of its supertypes.", functionName));
89
+
ctx.addIssue(y, String.format("Remove this yield statement or annotate function \"%s\" with \"%s\" or one of its supertypes.", functionName, recommendedSuperType));
0 commit comments