Mark callSite parameter in PyTypeProvider.getCallType as not null (PY-29577)

This commit is contained in:
Semyon Proshev
2018-07-02 15:36:25 +03:00
parent 07fdfcbe44
commit 1c851012d0
7 changed files with 12 additions and 25 deletions

View File

@@ -45,7 +45,7 @@ public interface PyTypeProvider {
Ref<PyType> getReturnType(@NotNull PyCallable callable, @NotNull TypeEvalContext context);
@Nullable
Ref<PyType> getCallType(@NotNull PyFunction function, @Nullable PyCallSiteExpression callSite, @NotNull TypeEvalContext context);
Ref<PyType> getCallType(@NotNull PyFunction function, @NotNull PyCallSiteExpression callSite, @NotNull TypeEvalContext context);
@Nullable
PyType getContextManagerVariableType(PyClass contextManager, PyExpression withExpression, TypeEvalContext context);

View File

@@ -65,7 +65,7 @@ public class PyTypeProviderBase implements PyTypeProvider {
@Nullable
@Override
public Ref<PyType> getCallType(@NotNull PyFunction function, @Nullable PyCallSiteExpression callSite, @NotNull TypeEvalContext context) {
public Ref<PyType> getCallType(@NotNull PyFunction function, @NotNull PyCallSiteExpression callSite, @NotNull TypeEvalContext context) {
final ReturnTypeDescriptor descriptor;
synchronized (myMethodToReturnTypeMap) {
descriptor = myMethodToReturnTypeMap.get(function.getName());