From 9da322a36a60e2965d068ddc452a8eddc45a38e5 Mon Sep 17 00:00:00 2001 From: Denis Cherednichenko Date: Sat, 10 Jan 2026 09:10:43 +0300 Subject: [PATCH] Improve types for simple examples --- AUTHORS | 1 + doc/en/example/simple.rst | 7 ++----- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/AUTHORS b/AUTHORS index 7d9ffb3b759..09c5872fe07 100644 --- a/AUTHORS +++ b/AUTHORS @@ -130,6 +130,7 @@ David Szotten David Vierra Daw-Ran Liou Debi Mishra +Denis Cherednichenko Denis Kirisov Denivy Braiam Rück Deysha Rivera diff --git a/doc/en/example/simple.rst b/doc/en/example/simple.rst index 8b35f0ebca5..0640160e3bb 100644 --- a/doc/en/example/simple.rst +++ b/doc/en/example/simple.rst @@ -553,12 +553,10 @@ an ``incremental`` marker which is to be used on classes: # content of conftest.py - from typing import Dict, Tuple - import pytest # store history of failures per test class name and per index in parametrize (if parametrize used) - _test_failed_incremental: Dict[str, Dict[Tuple[int, ...], str]] = {} + _test_failed_incremental: dict[str, dict[tuple[int, ...], str]] = {} def pytest_runtest_makereport(item, call): @@ -883,11 +881,10 @@ here is a little example implemented via a local plugin: .. code-block:: python # content of conftest.py - from typing import Dict import pytest from pytest import StashKey, CollectReport - phase_report_key = StashKey[Dict[str, CollectReport]]() + phase_report_key = StashKey[dict[str, CollectReport]]() @pytest.hookimpl(wrapper=True, tryfirst=True)