mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Don't show empty arglist at decorators if there's none. Fixes PY-194.
This commit is contained in:
@@ -205,16 +205,18 @@ public class PythonDocumentationProvider extends QuickDocumentationProvider {
|
||||
) {
|
||||
cat.append("@");
|
||||
name_wrapper.apply(PyUtil.getReadableRepr(deco.getCallee(), true), cat);
|
||||
PyArgumentList arglist = deco.getArgumentList();
|
||||
if (arglist != null) {
|
||||
List<String> argnames = FP.map(
|
||||
FP.combine(LReadableRepr, arg_wrapper),
|
||||
Arrays.asList(arglist.getArguments())
|
||||
);
|
||||
if (deco.hasArgumentList()) {
|
||||
PyArgumentList arglist = deco.getArgumentList();
|
||||
if (arglist != null) {
|
||||
List<String> argnames = FP.map(
|
||||
FP.combine(LReadableRepr, arg_wrapper),
|
||||
Arrays.asList(arglist.getArguments())
|
||||
);
|
||||
|
||||
cat.append("(");
|
||||
join(", ", argnames, cat);
|
||||
cat.append(")");
|
||||
cat.append("(");
|
||||
join(", ", argnames, cat);
|
||||
cat.append(")");
|
||||
}
|
||||
}
|
||||
return cat;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user