mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Renamed PyTypeProvider.getReturnType() to getCallType()
This commit is contained in:
@@ -39,7 +39,7 @@ public interface PyTypeProvider {
|
||||
PyType getParameterType(@NotNull PyNamedParameter param, @NotNull PyFunction func, @NotNull TypeEvalContext context);
|
||||
|
||||
@Nullable
|
||||
PyType getReturnType(@NotNull PyFunction function, @Nullable PyQualifiedExpression callSite, @NotNull TypeEvalContext context);
|
||||
PyType getCallType(@NotNull PyFunction function, @Nullable PyQualifiedExpression callSite, @NotNull TypeEvalContext context);
|
||||
|
||||
@Nullable
|
||||
PyType getContextManagerVariableType(PyClass contextManager, PyExpression withExpression, TypeEvalContext context);
|
||||
|
||||
@@ -95,7 +95,7 @@ public class PyTypeProviderBase implements PyTypeProvider {
|
||||
}
|
||||
|
||||
@Override
|
||||
public PyType getReturnType(@NotNull PyFunction function, @Nullable PyQualifiedExpression callSite, @NotNull TypeEvalContext context) {
|
||||
public PyType getCallType(@NotNull PyFunction function, @Nullable PyQualifiedExpression callSite, @NotNull TypeEvalContext context) {
|
||||
ReturnTypeDescriptor descriptor;
|
||||
synchronized (myMethodToReturnTypeMap) {
|
||||
descriptor = myMethodToReturnTypeMap.get(function.getName());
|
||||
|
||||
@@ -67,7 +67,7 @@ public class NumpyDocStringTypeProvider extends PyTypeProviderBase {
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public PyType getReturnType(@NotNull PyFunction function, @Nullable PyQualifiedExpression callSite, @NotNull TypeEvalContext context) {
|
||||
public PyType getCallType(@NotNull PyFunction function, @Nullable PyQualifiedExpression callSite, @NotNull TypeEvalContext context) {
|
||||
if (isInsideNumPy(function)) {
|
||||
final NumPyDocString docString = NumPyDocString.forFunction(function, callSite);
|
||||
if (docString != null) {
|
||||
|
||||
@@ -37,7 +37,7 @@ public class PyQtTypeProvider extends PyTypeProviderBase {
|
||||
private static final String ourQt4Signal = "pyqtSignal";
|
||||
|
||||
@Override
|
||||
public PyType getReturnType(@NotNull PyFunction function, @Nullable PyQualifiedExpression callSite, @NotNull TypeEvalContext context) {
|
||||
public PyType getCallType(@NotNull PyFunction function, @Nullable PyQualifiedExpression callSite, @NotNull TypeEvalContext context) {
|
||||
if (PyNames.INIT.equals(function.getName())) {
|
||||
final PyClass containingClass = function.getContainingClass();
|
||||
if (containingClass != null && ourQt4Signal.equals(containingClass.getName())) {
|
||||
|
||||
@@ -120,7 +120,7 @@ public class PyStdlibTypeProvider extends PyTypeProviderBase {
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public PyType getReturnType(@NotNull PyFunction function, @Nullable PyQualifiedExpression callSite, @NotNull TypeEvalContext context) {
|
||||
public PyType getCallType(@NotNull PyFunction function, @Nullable PyQualifiedExpression callSite, @NotNull TypeEvalContext context) {
|
||||
final String qname = getQualifiedName(function, callSite);
|
||||
if (qname != null) {
|
||||
if (OPEN_FUNCTIONS.contains(qname) && callSite != null) {
|
||||
|
||||
+1
-1
@@ -43,7 +43,7 @@ public class PyUserSkeletonsTypeProvider extends PyTypeProviderBase {
|
||||
}
|
||||
|
||||
@Override
|
||||
public PyType getReturnType(@NotNull PyFunction function, @Nullable PyQualifiedExpression callSite, @NotNull TypeEvalContext context) {
|
||||
public PyType getCallType(@NotNull PyFunction function, @Nullable PyQualifiedExpression callSite, @NotNull TypeEvalContext context) {
|
||||
final PyFunction functionSkeleton = PyUserSkeletonsUtil.getUserSkeleton(function);
|
||||
if (functionSkeleton != null) {
|
||||
return functionSkeleton.getCallType(context, callSite);
|
||||
|
||||
@@ -261,7 +261,7 @@ public class PyFunctionImpl extends PyPresentableElementImpl<PyFunctionStub> imp
|
||||
}
|
||||
}
|
||||
for (PyTypeProvider typeProvider : Extensions.getExtensions(PyTypeProvider.EP_NAME)) {
|
||||
final PyType returnType = typeProvider.getReturnType(this, callSite, typeEvalContext);
|
||||
final PyType returnType = typeProvider.getCallType(this, callSite, typeEvalContext);
|
||||
if (returnType != null) {
|
||||
returnType.assertValid(typeProvider.toString());
|
||||
return returnType;
|
||||
|
||||
Reference in New Issue
Block a user