mark: allow any Sequence[str] for parametrize(argnames), not just list/tuple

The main motivation for this change is to simplify the type shown in
code editors -- `Sequence[str]` is easier to follow than
`Union[list[str], tuple[str, ...]]`.

It also permits using other types if desired. It might lead to problems
if someone uses some oddball sequence type, but hopefully they won't do
that.
This commit is contained in:
Ran Benita
2022-08-15 19:12:12 +03:00
parent f425dfc158
commit 67e29d2548
3 changed files with 12 additions and 7 deletions

View File

@@ -1207,7 +1207,7 @@ class Metafunc:
def parametrize(
self,
argnames: Union[str, List[str], Tuple[str, ...]],
argnames: Union[str, Sequence[str]],
argvalues: Iterable[Union[ParameterSet, Sequence[object], object]],
indirect: Union[bool, Sequence[str]] = False,
ids: Optional[