diff options
author | robot-piglet <[email protected]> | 2025-07-27 14:17:18 +0300 |
---|---|---|
committer | robot-piglet <[email protected]> | 2025-07-27 14:28:59 +0300 |
commit | e74d928d0f6c56f02ed72685ff569160f049174a (patch) | |
tree | e5ee17ec64fb59e5be233dee5ec40e23d2b3a324 /contrib/python/pytest-lazy-fixtures/pytest_lazy_fixtures/normalizer.py | |
parent | 0c4a0ee940a18305115568ee3d2831e0fbbe04b1 (diff) |
Intermediate changes
commit_hash:f52a543082ebbfceb217aa858510084bd9a96c06
Diffstat (limited to 'contrib/python/pytest-lazy-fixtures/pytest_lazy_fixtures/normalizer.py')
-rw-r--r-- | contrib/python/pytest-lazy-fixtures/pytest_lazy_fixtures/normalizer.py | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/contrib/python/pytest-lazy-fixtures/pytest_lazy_fixtures/normalizer.py b/contrib/python/pytest-lazy-fixtures/pytest_lazy_fixtures/normalizer.py index f557e4da9ca..699400c084b 100644 --- a/contrib/python/pytest-lazy-fixtures/pytest_lazy_fixtures/normalizer.py +++ b/contrib/python/pytest-lazy-fixtures/pytest_lazy_fixtures/normalizer.py @@ -1,5 +1,7 @@ +from __future__ import annotations + import copy -from typing import Any, Dict, Iterable, Iterator, List, Tuple +from typing import Any, Iterable, Iterator import pytest @@ -7,7 +9,7 @@ from .lazy_fixture import LazyFixtureWrapper from .lazy_fixture_callable import LazyFixtureCallableWrapper -def _get_fixturenames_closure_and_arg2fixturedefs(fm, metafunc, value) -> Tuple[List[str], Dict[str, Any]]: +def _get_fixturenames_closure_and_arg2fixturedefs(fm, metafunc, value) -> tuple[list[str], dict[str, Any]]: if isinstance(value, LazyFixtureCallableWrapper): extra_fixturenames_args, arg2fixturedefs_args = _get_fixturenames_closure_and_arg2fixturedefs( fm, @@ -33,7 +35,7 @@ def _get_fixturenames_closure_and_arg2fixturedefs(fm, metafunc, value) -> Tuple[ return fixturenames_closure, arg2fixturedefs extra_fixturenames, arg2fixturedefs = [], {} # we need to check exact type - if type(value) is dict: # noqa: E721 + if type(value) is dict: value = list(value.values()) # we need to check exact type if type(value) in {list, tuple, set}: @@ -60,7 +62,7 @@ def _copy_metafunc(metafunc): return copied -def _uniq(values: "Iterable[str]") -> "Iterator[str]": +def _uniq(values: Iterable[str]) -> Iterator[str]: seen = set() for value in values: if value not in seen: |