TypeModel (@NotNull PyCallableType type) { List<TypeModel> parameterModels = null; final List<PyCallableParameter> parameters = type.getParameters(myContext); if (parameters != null) { parameterModels = new ArrayList<>(); for (PyCallableParameter parameter : parameters) { final var paramType = parameter.getType(myContext); if (paramType instanceof PyParamSpecType || paramType instanceof PyConcatenateType) { parameterModels.add(new ParamType(null, build(parameter.getType(myContext), true))); } else { parameterModels.add(new ParamType(parameter.getName(), build(parameter.getType(myContext), true))); } } } final PyType ret = type.getReturnType(myContext); final TypeModel returnType = build(ret, true); return new FunctionType(returnType, parameterModels); }