|
21 | 21 | import warnings |
22 | 22 |
|
23 | 23 | from .._code import getfslineno |
24 | | -from ..compat import deprecated |
25 | 24 | from ..compat import NOTSET |
26 | 25 | from ..compat import NotSetType |
27 | 26 | from _pytest.config import Config |
@@ -537,31 +536,16 @@ def __call__( |
537 | 536 | ) -> MarkDecorator: ... |
538 | 537 |
|
539 | 538 | class _ParametrizeMarkDecorator(MarkDecorator): |
540 | | - @overload # type: ignore[override,no-overload-impl] |
541 | | - def __call__( |
542 | | - self, |
543 | | - argnames: str | Sequence[str], |
544 | | - argvalues: Collection[ParameterSet | Sequence[object] | object], |
545 | | - *, |
546 | | - indirect: bool | Sequence[str] = ..., |
547 | | - ids: Iterable[None | str | float | int | bool | _HiddenParam] |
548 | | - | Callable[[Any], object | None] |
549 | | - | None = ..., |
550 | | - scope: ScopeName | None = ..., |
551 | | - ) -> MarkDecorator: ... |
552 | | - |
553 | | - @overload |
554 | | - @deprecated( |
555 | | - "Passing a non-Collection iterable to the 'argvalues' parameter of @pytest.mark.parametrize is deprecated. " |
556 | | - "Convert argvalues to a list or tuple.", |
557 | | - ) |
558 | | - def __call__( |
| 539 | + def __call__( # type: ignore[override] |
559 | 540 | self, |
560 | 541 | argnames: str | Sequence[str], |
561 | 542 | argvalues: Iterable[ParameterSet | Sequence[object] | object], |
| 543 | + # TODO(pytest10): Change to below after PARAMETRIZE_NON_COLLECTION_ITERABLE deprecation. |
| 544 | + # Overload doesn't work, see #14606. |
| 545 | + # argvalues: Collection[ParameterSet | Sequence[object] | object], |
562 | 546 | *, |
563 | 547 | indirect: bool | Sequence[str] = ..., |
564 | | - ids: Iterable[None | str | float | int | bool] |
| 548 | + ids: Iterable[None | str | float | int | bool | _HiddenParam] |
565 | 549 | | Callable[[Any], object | None] |
566 | 550 | | None = ..., |
567 | 551 | scope: ScopeName | None = ..., |
|
0 commit comments