Commit 6f235b2f authored by Semyon Proshev's avatar Semyon Proshev
Browse files

Pull up mapArguments(PyResolveContext) from PyCallExpressionImpl and...

Pull up mapArguments(PyResolveContext) from PyCallExpressionImpl and PyDecoratorImpl to PyCallExpression
parent 5fb9f310
Branches unavailable Tags unavailable
No related merge requests found
Showing with 16 additions and 13 deletions
+16 -13
......@@ -254,9 +254,24 @@ public interface PyCallExpression extends PyCallSiteExpression {
@NotNull
List<PyRatedMarkedCallee> multiResolveRatedCallee(@NotNull PyResolveContext resolveContext, int implicitOffset);
/**
* Resolves the callee down to particular function (standalone, method, or constructor) and maps arguments to parameters.
*
* @param resolveContext resolve context
* @return an object which contains callable and mappings.
*/
@NotNull
PyArgumentsMapping mapArguments(@NotNull PyResolveContext resolveContext);
default PyArgumentsMapping mapArguments(@NotNull PyResolveContext resolveContext) {
return mapArguments(resolveContext, 0);
}
/**
* Resolves the callee down to particular function (standalone, method, or constructor) and maps arguments to parameters.
*
* @param resolveContext resolve context
* @param implicitOffset implicit offset which is known from the context
* @return an object which contains callable and mappings.
*/
@NotNull
PyArgumentsMapping mapArguments(@NotNull PyResolveContext resolveContext, int implicitOffset);
......
......@@ -54,12 +54,6 @@ public class PyCallExpressionImpl extends PyElementImpl implements PyCallExpress
return PyCallExpressionHelper.multiResolveRatedCallee(this, resolveContext, implicitOffset);
}
@NotNull
@Override
public PyArgumentsMapping mapArguments(@NotNull PyResolveContext resolveContext) {
return PyCallExpressionHelper.mapArguments(this, resolveContext, 0);
}
@NotNull
@Override
public PyArgumentsMapping mapArguments(@NotNull PyResolveContext resolveContext, int implicitOffset) {
......
......@@ -126,12 +126,6 @@ public class PyDecoratorImpl extends StubBasedPsiElementBase<PyDecoratorStub> im
return ContainerUtil.map(PyCallExpressionHelper.multiResolveRatedCallee(this, resolveContext, implicitOffset), mapping);
}
@NotNull
@Override
public PyArgumentsMapping mapArguments(@NotNull PyResolveContext resolveContext) {
return PyCallExpressionHelper.mapArguments(this, resolveContext, 0);
}
@NotNull
@Override
public PyArgumentsMapping mapArguments(@NotNull PyResolveContext resolveContext, int implicitOffset) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment