mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-10-07 04:34:33 +08:00
Add a typevar with a default to io.TextIOWrapper (#12286)
This commit is contained in:
1 parent
e8cc1e46fe
commit
9f2a9d8579
2 files changed
+11
-10
No files matched your search
@@ -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