Skip to content

Commit 8c53dbf

Browse files
committed
capture: fix pyright type error
This is OK in mypy, but doesn't hurt to fix.
1 parent 54b8b40 commit 8c53dbf

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/_pytest/capture.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
from _pytest.nodes import Item
3737

3838
if TYPE_CHECKING:
39+
from typing_extensions import Final
3940
from typing_extensions import Literal
4041

4142
_CaptureMethod = Literal["fd", "sys", "no", "tee-sys"]
@@ -723,7 +724,7 @@ class CaptureManager:
723724
"""
724725

725726
def __init__(self, method: "_CaptureMethod") -> None:
726-
self._method = method
727+
self._method: Final = method
727728
self._global_capturing: Optional[MultiCapture[str]] = None
728729
self._capture_fixture: Optional[CaptureFixture[Any]] = None
729730

0 commit comments

Comments
 (0)