Skip to content

Commit 1371b01

Browse files
committed
typing for ReprFailDoctest
1 parent f0c2b07 commit 1371b01

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/_pytest/doctest.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
import traceback
77
import warnings
88
from contextlib import contextmanager
9+
from typing import Sequence
10+
from typing import Tuple
911

1012
import pytest
1113
from _pytest import outcomes
@@ -113,11 +115,12 @@ def _is_doctest(config, path, parent):
113115

114116

115117
class ReprFailDoctest(TerminalRepr):
116-
def __init__(self, reprlocation_lines):
117-
# List of (reprlocation, lines) tuples
118+
def __init__(
119+
self, reprlocation_lines: Sequence[Tuple[ReprFileLocation, Sequence[str]]]
120+
):
118121
self.reprlocation_lines = reprlocation_lines
119122

120-
def toterminal(self, tw):
123+
def toterminal(self, tw) -> None:
121124
for reprlocation, lines in self.reprlocation_lines:
122125
for line in lines:
123126
tw.line(line)

0 commit comments

Comments
 (0)