PyExpression (@NotNull PyCallExpression.PyArgumentsMapping mapping, @NotNull PyCallableParameter parameter) { final String name = parameter.getName(); final PyExpression value = parameter.getDefaultValue(); if (name == null || !(value instanceof PyNoneLiteralExpression) || !((PyNoneLiteralExpression)value).isEllipsis()) return value; final PyCallableType callableType = mapping.getCallableType(); if (callableType == null) return value; final PyCallable callable = callableType.getCallable(); if (callable == null) return value; if (PyiUtil.isInsideStub(callable)) { final PyCallable originalCallable = PyiUtil.getOriginalElementOrLeaveAsIs(callable, PyCallable.class); final PyNamedParameter originalParameter = originalCallable.getParameterList().findParameterByName(name); if (originalParameter != null) return originalParameter.getDefaultValue(); } return value; }