Skip to content

Commit a701f7f

Browse files
committed
[stdlib] Use Union syntax for Python 3.9 compatibility in test
1 parent fe0fb98 commit a701f7f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

stdlib/@tests/test_cases/check_logging.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
import logging.handlers
66
import multiprocessing
77
import queue
8-
from typing import Any
8+
from typing import Any, Union
99
from typing_extensions import assert_type
1010

1111
# This pattern comes from the logging docs, and should therefore pass a type checker
@@ -33,4 +33,4 @@ def record_factory(*args: Any, **kwargs: Any) -> logging.LogRecord:
3333

3434
# FileHandler.stream can be None when delay=True or after close()
3535
fh = logging.FileHandler("test.log", delay=True)
36-
assert_type(fh.stream, io.TextIOWrapper | None)
36+
assert_type(fh.stream, Union[io.TextIOWrapper, None])

0 commit comments

Comments
 (0)