capture: fix pyright type error

This is OK in mypy, but doesn't hurt to fix.
This commit is contained in:
Ran Benita 2023-01-21 11:00:25 +02:00
parent 54b8b40f83
commit 8c53dbf9d7
1 changed files with 2 additions and 1 deletions

View File

@ -36,6 +36,7 @@ from _pytest.nodes import File
from _pytest.nodes import Item
if TYPE_CHECKING:
from typing_extensions import Final
from typing_extensions import Literal
_CaptureMethod = Literal["fd", "sys", "no", "tee-sys"]
@ -723,7 +724,7 @@ class CaptureManager:
"""
def __init__(self, method: "_CaptureMethod") -> None:
self._method = method
self._method: Final = method
self._global_capturing: Optional[MultiCapture[str]] = None
self._capture_fixture: Optional[CaptureFixture[Any]] = None