mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Fixed nullness annotations
This commit is contained in:
@@ -74,7 +74,7 @@ public class PyUsageTypeProvider implements UsageTypeProviderEx {
|
||||
}
|
||||
|
||||
@Nullable
|
||||
private static UsageType checkMatchingSignatureGroup(PyCallExpression call, UsageTarget[] targets, TypeEvalContext context) {
|
||||
private static UsageType checkMatchingSignatureGroup(PyCallExpression call, UsageTarget[] targets, @NotNull TypeEvalContext context) {
|
||||
if (targets.length == 1 && targets[0] instanceof PsiElementUsageTarget) {
|
||||
final PsiElement element = ((PsiElementUsageTarget)targets[0]).getElement();
|
||||
if (element instanceof PyFunction) {
|
||||
|
||||
@@ -49,7 +49,7 @@ public class CallArgumentsMappingImpl implements CallArgumentsMapping {
|
||||
* @param resolved_callee what to map parameters of
|
||||
* @param context optional shared type evaluator / cache.
|
||||
*/
|
||||
public void mapArguments(PyCallExpression.PyMarkedCallee resolved_callee, @Nullable TypeEvalContext context) {
|
||||
public void mapArguments(PyCallExpression.PyMarkedCallee resolved_callee, @NotNull TypeEvalContext context) {
|
||||
PyExpression[] arguments = myArgumentList.getArguments();
|
||||
myMarkedCallee = resolved_callee;
|
||||
List<PyExpression> unmatched_args = new LinkedList<PyExpression>();
|
||||
@@ -206,11 +206,9 @@ public class CallArgumentsMappingImpl implements CallArgumentsMapping {
|
||||
if (cnt < parameters.length && cnt < positional_index && myTupleArg != null) {
|
||||
// check length of myTupleArg
|
||||
PyType tuple_arg_type = null;
|
||||
if (context != null) {
|
||||
final PyExpression expression = PsiTreeUtil.getChildOfType(myTupleArg, PyExpression.class);
|
||||
if (expression != null) {
|
||||
tuple_arg_type = context.getType(expression);
|
||||
}
|
||||
final PyExpression expression = PsiTreeUtil.getChildOfType(myTupleArg, PyExpression.class);
|
||||
if (expression != null) {
|
||||
tuple_arg_type = context.getType(expression);
|
||||
}
|
||||
int tuple_length;
|
||||
boolean tuple_length_known;
|
||||
|
||||
Reference in New Issue
Block a user