Skip to content

Commit b509fce

Browse files
[mypy] Proper typing of mixed type string wrapper
1 parent 0ca9eec commit b509fce

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

testing/io/test_terminalwriter.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
from collections.abc import Generator
55
import io
6+
from io import StringIO
67
import os
78
from pathlib import Path
89
import re
@@ -68,6 +69,7 @@ def test_terminalwriter_not_unicode() -> None:
6869
class TestTerminalWriter:
6970
@pytest.fixture(params=["path", "stringio"])
7071
def tw(self, request, tmp_path: Path) -> Generator[terminalwriter.TerminalWriter]:
72+
f: io.TextIOWrapper | StringIO
7173
if request.param == "path":
7274
p = tmp_path.joinpath("tmpfile")
7375
f = open(str(p), "w+", encoding="utf8")

0 commit comments

Comments
 (0)