mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Fixed type of 'iter()' built-in function (PY-10854)
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
def test_second_form():
|
||||
def f():
|
||||
return ''
|
||||
|
||||
for chunk in iter(lambda: f(), ''):
|
||||
pass
|
||||
|
||||
|
||||
def test_second_form_fail():
|
||||
for chunk in iter(<weak_warning descr="Expected type 'Iterable | () -> object' (matched generic type 'Iterable[T] | () -> object'), got 'int' instead">10</weak_warning>, ''):
|
||||
pass
|
||||
|
||||
|
||||
def test_first_form():
|
||||
for x in iter([1, 2, 3]):
|
||||
pass
|
||||
@@ -208,4 +208,9 @@ public class PyTypeCheckerInspectionTest extends PyTestCase {
|
||||
public void testStringStartsWith() {
|
||||
doTest();
|
||||
}
|
||||
|
||||
// PY-10854
|
||||
public void testSecondFormIter() {
|
||||
doTest();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user