mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-10 05:51:52 +08:00
Add a typevar with a default to io.TextIOWrapper (#12286)
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
from gzip import GzipFile
|
||||
from io import FileIO, TextIOWrapper
|
||||
from typing_extensions import assert_type
|
||||
|
||||
TextIOWrapper(FileIO(""))
|
||||
TextIOWrapper(FileIO(13))
|
||||
TextIOWrapper(GzipFile(""))
|
||||
assert_type(TextIOWrapper(FileIO("")).buffer, FileIO)
|
||||
assert_type(TextIOWrapper(FileIO(13)).detach(), FileIO)
|
||||
assert_type(TextIOWrapper(GzipFile("")).buffer, GzipFile)
|
||||
|
||||
Reference in New Issue
Block a user