Skip to content

Commit 7cb6f8e

Browse files
BeamOfLightpatchback[bot]
authored andcommitted
doc: use new-style dict/tuple annotations in simple.rst examples (#14100)
(cherry picked from commit c6f7d54)
1 parent 1905518 commit 7cb6f8e

2 files changed

Lines changed: 3 additions & 5 deletions

File tree

AUTHORS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,7 @@ David Szotten
130130
David Vierra
131131
Daw-Ran Liou
132132
Debi Mishra
133+
Denis Cherednichenko
133134
Denis Kirisov
134135
Denivy Braiam Rück
135136
Deysha Rivera

doc/en/example/simple.rst

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -553,12 +553,10 @@ an ``incremental`` marker which is to be used on classes:
553553
554554
# content of conftest.py
555555
556-
from typing import Dict, Tuple
557-
558556
import pytest
559557
560558
# store history of failures per test class name and per index in parametrize (if parametrize used)
561-
_test_failed_incremental: Dict[str, Dict[Tuple[int, ...], str]] = {}
559+
_test_failed_incremental: dict[str, dict[tuple[int, ...], str]] = {}
562560
563561
564562
def pytest_runtest_makereport(item, call):
@@ -883,11 +881,10 @@ here is a little example implemented via a local plugin:
883881
.. code-block:: python
884882
885883
# content of conftest.py
886-
from typing import Dict
887884
import pytest
888885
from pytest import StashKey, CollectReport
889886
890-
phase_report_key = StashKey[Dict[str, CollectReport]]()
887+
phase_report_key = StashKey[dict[str, CollectReport]]()
891888
892889
893890
@pytest.hookimpl(wrapper=True, tryfirst=True)

0 commit comments

Comments
 (0)