mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Update skeletons for max function
This commit is contained in:
@@ -219,6 +219,16 @@ def min(*args, key=None, default=None):
|
||||
pass
|
||||
|
||||
|
||||
def max(*args, key=None, default=None):
|
||||
"""Return the largest item in an iterable or the largest of two or more
|
||||
arguments.
|
||||
|
||||
:type args: T
|
||||
:rtype: T
|
||||
"""
|
||||
pass
|
||||
|
||||
|
||||
def next(iterator, default=None):
|
||||
"""Return the next item from the iterator.
|
||||
|
||||
|
||||
@@ -189,15 +189,6 @@ def locals():
|
||||
return {}
|
||||
|
||||
|
||||
def max(*args, key=None, default=None):
|
||||
"""Return the largest item in an iterable or the largest of two or more
|
||||
arguments.
|
||||
|
||||
:rtype: object | unknown
|
||||
"""
|
||||
pass
|
||||
|
||||
|
||||
class map(object):
|
||||
def __init__(self, function, sequence, *sequence_1):
|
||||
"""Return an iterable of the results of applying the function to the items of
|
||||
@@ -231,6 +222,16 @@ def min(*args, key=None, default=None):
|
||||
pass
|
||||
|
||||
|
||||
def max(*args, key=None, default=None):
|
||||
"""Return the largest item in an iterable or the largest of two or more
|
||||
arguments.
|
||||
|
||||
:type args: T
|
||||
:rtype: T
|
||||
"""
|
||||
pass
|
||||
|
||||
|
||||
def next(iterator, default=None):
|
||||
"""Return the next item from the iterator.
|
||||
|
||||
|
||||
@@ -470,6 +470,11 @@ public class Py3TypeTest extends PyTestCase {
|
||||
"expr = min(1, 2, 3)");
|
||||
}
|
||||
|
||||
public void testMaxResult() {
|
||||
doTest("int",
|
||||
"expr = max(1, 2, 3)");
|
||||
}
|
||||
|
||||
private void doTest(final String expectedType, final String text) {
|
||||
myFixture.configureByText(PythonFileType.INSTANCE, text);
|
||||
final PyExpression expr = myFixture.findElementByText("expr", PyExpression.class);
|
||||
|
||||
@@ -1519,6 +1519,11 @@ public class PyTypeTest extends PyTestCase {
|
||||
"expr = min(1, 2, 3)");
|
||||
}
|
||||
|
||||
public void testMaxResult() {
|
||||
doTest("int",
|
||||
"expr = max(1, 2, 3)");
|
||||
}
|
||||
|
||||
private static List<TypeEvalContext> getTypeEvalContexts(@NotNull PyExpression element) {
|
||||
return ImmutableList.of(TypeEvalContext.codeAnalysis(element.getProject(), element.getContainingFile()).withTracing(),
|
||||
TypeEvalContext.userInitiated(element.getProject(), element.getContainingFile()).withTracing());
|
||||
|
||||
Reference in New Issue
Block a user