mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
TypeEvalContext for docstring types inspection from inspection session
This commit is contained in:
@@ -16,7 +16,6 @@ import com.jetbrains.python.psi.PyStringLiteralExpression;
|
||||
import com.jetbrains.python.psi.types.PyType;
|
||||
import com.jetbrains.python.psi.types.PyTypeChecker;
|
||||
import com.jetbrains.python.psi.types.PyTypeParser;
|
||||
import com.jetbrains.python.psi.types.TypeEvalContext;
|
||||
import org.jetbrains.annotations.Nls;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
@@ -98,10 +97,10 @@ public class PyDocstringTypesInspection extends PyInspection {
|
||||
}
|
||||
}
|
||||
|
||||
private static boolean match(PsiElement anchor, String dynamicTypeName, String specifiedTypeName) {
|
||||
private boolean match(PsiElement anchor, String dynamicTypeName, String specifiedTypeName) {
|
||||
final PyType dynamicType = PyTypeParser.getTypeByName(anchor, dynamicTypeName);
|
||||
final PyType specifiedType = PyTypeParser.getTypeByName(anchor, specifiedTypeName);
|
||||
return PyTypeChecker.match(specifiedType, dynamicType, TypeEvalContext.slow());
|
||||
return PyTypeChecker.match(specifiedType, dynamicType, myTypeEvalContext);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user