mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 06:05:01 +07:00
Update skeletons for min function to fit updated type processing of positional and keyword arguments
This commit is contained in:
@@ -213,7 +213,7 @@ def min(*args, key=None, default=None):
|
||||
"""Return the smallest item in an iterable or the smallest of two or more
|
||||
arguments.
|
||||
|
||||
:type args: tuple[T]
|
||||
:type args: T
|
||||
:rtype: T
|
||||
"""
|
||||
pass
|
||||
|
||||
@@ -225,7 +225,7 @@ def min(*args, key=None, default=None):
|
||||
"""Return the smallest item in an iterable or the smallest of two or more
|
||||
arguments.
|
||||
|
||||
:type args: tuple[T]
|
||||
:type args: T
|
||||
:rtype: T
|
||||
"""
|
||||
pass
|
||||
|
||||
@@ -465,6 +465,11 @@ public class Py3TypeTest extends PyTestCase {
|
||||
"expr = input()");
|
||||
}
|
||||
|
||||
public void testMinResult() {
|
||||
doTest("int",
|
||||
"expr = min(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);
|
||||
|
||||
@@ -1514,6 +1514,11 @@ public class PyTypeTest extends PyTestCase {
|
||||
" expr = things if things else []");
|
||||
}
|
||||
|
||||
public void testMinResult() {
|
||||
doTest("int",
|
||||
"expr = min(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