Commit Graph

9 Commits

Author SHA1 Message Date
Akuli
ee487304d7 Big diff: Use new "|" union syntax (#5872) 2021-08-08 11:05:21 +02:00
Anton Grübel
39ede0242c add missing type hints for __class_getitem__ (#5869) 2021-08-07 16:12:53 +02:00
Anton Grübel
8a107464a8 Use _typeshed.Self with __enter__ (#5719) 2021-07-01 23:15:13 +02:00
Akuli
55a2a180c6 tempfile._TemporaryFileWrapper enhancements (#5519) 2021-05-25 15:30:08 +02:00
Jade
56ebf92463 Make _TemporaryFileWrapper generic on AnyStr, use it (#5456)
* Make _TemporaryFileWrapper generic on AnyStr, use it

Previously it was not used on NamedTemoraryFile and thus the file
field was missing from the types for the return value of
NamedTemoraryFile.
2021-05-17 19:04:40 +03:00
Eric Traut
f8e70d66e8 Improved overloads for mkstemp and mktemp functions in tempfile.pyi (#5133) 2021-03-23 17:07:46 -07:00
Edgar Handal
45c916e8d2 Type fixes for tempfile.TemporaryDirectory (#5121)
If no arguments are passed to the TemporaryDirectory constructor, then
the class defaults to using str. Overload the __init__ function to
cover this case.
2021-03-22 18:30:22 -07:00
Eric Traut
e4005505b9 Fixed incompatible use of constrained TypeVar in tempfile. (#5043)
The TypeVar `_T` was being used as a type argument for `PathLike`, but `PathLike` requires that its type argument be constrained to `str` or `bytes`, and `_T` didn't provide any such constraint. The easy workaround is to use the TypeVar `AnyStr` instead.

Co-authored-by: Eric Traut <erictr@microsoft.com>
2021-02-20 13:11:36 -08:00
Ivan Levkivskyi
16ae4c6120 Re-organize directory structure (#4971)
See discussion in #2491

Co-authored-by: Ivan Levkivskyi <ilevkivskyi@dropbox.com>
2021-01-27 12:00:39 +00:00