mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Added __next__() and next() special methods to class-level completion (PY-11214)
This commit is contained in:
@@ -347,6 +347,7 @@ public class PyNames {
|
||||
.putAll(BuiltinMethods)
|
||||
.put("__nonzero__", _only_self_descr)
|
||||
.put("__div__", _self_other_descr)
|
||||
.put(NEXT, _only_self_descr)
|
||||
.build();
|
||||
|
||||
public static ImmutableMap<String, BuiltinDescription> PY3_BUILTIN_METHODS = ImmutableMap.<String, BuiltinDescription>builder()
|
||||
@@ -355,6 +356,7 @@ public class PyNames {
|
||||
.put("__bytes__", _only_self_descr)
|
||||
.put("__format__", new BuiltinDescription("(self, format_spec)"))
|
||||
.put("__round__", new BuiltinDescription("(self, n=None)"))
|
||||
.put(DUNDER_NEXT, _only_self_descr)
|
||||
.build();
|
||||
|
||||
public static ImmutableMap<String, BuiltinDescription> PY35_BUILTIN_METHODS = ImmutableMap.<String, BuiltinDescription>builder()
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
class C:
|
||||
def __next__(self):
|
||||
@@ -0,0 +1,2 @@
|
||||
class C:
|
||||
def __nex<caret>
|
||||
@@ -0,0 +1,2 @@
|
||||
class C:
|
||||
def next(self):
|
||||
@@ -0,0 +1,2 @@
|
||||
class C:
|
||||
def nex<caret>
|
||||
@@ -151,4 +151,9 @@ public class Py3CompletionTest extends PyTestCase {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// PY-11214
|
||||
public void testDunderNext() {
|
||||
doTest();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -770,4 +770,9 @@ public class PythonCompletionTest extends PyTestCase {
|
||||
public void testStructuralType() {
|
||||
doTest();
|
||||
}
|
||||
|
||||
// PY-11214
|
||||
public void testNext() {
|
||||
doTest();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user