From 12054a49722eee2b12e3b9106f3cf878bcb13648 Mon Sep 17 00:00:00 2001 From: Sadra Barikbin Date: Thu, 27 Jul 2023 09:32:23 +0300 Subject: [PATCH] config: avoid list[], set[], dict[] Should wait with this until Python 3.8 is dropped. --- src/_pytest/config/__init__.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/_pytest/config/__init__.py b/src/_pytest/config/__init__.py index be62fe999..2b6f250f3 100644 --- a/src/_pytest/config/__init__.py +++ b/src/_pytest/config/__init__.py @@ -353,9 +353,9 @@ def _get_legacy_hook_marks( if TYPE_CHECKING: # abuse typeguard from importlib to avoid massive method type union thats lacking a alias assert inspect.isroutine(method) - known_marks: set[str] = {m.name for m in getattr(method, "pytestmark", [])} - must_warn: list[str] = [] - opts: dict[str, bool] = {} + known_marks: Set[str] = {m.name for m in getattr(method, "pytestmark", [])} + must_warn: List[str] = [] + opts: Dict[str, bool] = {} for opt_name in opt_names: opt_attr = getattr(method, opt_name, AttributeError) if opt_attr is not AttributeError: