Skip to content

Commit 9e1b84d

Browse files
committed
remove allow_any_iter
1 parent 521d22f commit 9e1b84d

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

tests/validators/test_list.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -449,7 +449,7 @@ def infinite_str_gen() -> Iterator[str]:
449449
# consumed the first item into an error, when we found a second item we errored so 3rd item is next
450450
@pytest.mark.parametrize('gen_factory,nxt', [(infinite_int_gen, 2), (infinite_str_gen, 'a_2')])
451451
def test_stop_iterating_on_error(gen_factory: Callable[[], Iterator[Any]], nxt: Any) -> None:
452-
v = SchemaValidator(core_schema.list_schema(core_schema.int_schema(), allow_any_iter=True, max_length=1))
452+
v = SchemaValidator(core_schema.list_schema(core_schema.int_schema(), max_length=1))
453453

454454
gen = gen_factory()
455455

@@ -476,9 +476,7 @@ def f(x: int) -> int:
476476
return x
477477

478478
v = SchemaValidator(
479-
core_schema.list_schema(
480-
core_schema.no_info_after_validator_function(f, core_schema.int_schema()), allow_any_iter=True, max_length=1
481-
)
479+
core_schema.list_schema(core_schema.no_info_after_validator_function(f, core_schema.int_schema()), max_length=1)
482480
)
483481

484482
gen = infinite_int_gen()

0 commit comments

Comments
 (0)