From 7cb6f8e7a52d05bd15fe6dd467491fc2bc0877bf Mon Sep 17 00:00:00 2001 From: Denis Cherednichenko Date: Mon, 12 Jan 2026 15:00:34 +0300 Subject: [PATCH] doc: use new-style dict/tuple annotations in simple.rst examples (#14100) (cherry picked from commit c6f7d54996a0b7dde57c57801f92ef3d7f827b07) --- AUTHORS | 1 + doc/en/example/simple.rst | 7 ++----- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/AUTHORS b/AUTHORS index ff37c8fbf26..a8c306bb945 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)