Michael Lee
efb67946f8
Use variable annotations everywhere ( #2909 )
2019-04-13 10:40:52 +02:00
Rebecca Chen
9b9ff64fc5
tempfile.mkdtemp() should return a str when passed no arguments. ( #2893 )
...
Otherwise, pytype expands `AnyStr` to `Union[str, bytes]`, leading
to spurious type errors later on.
* Mark the `dir` argument to mkdtemp as AnyStr.
2019-03-29 23:11:42 +01:00
Ruud van Asseldonk
b7d6bab83f
Fix stub for SpooledTemporaryFile ( #2452 )
...
Fixes #2431
2018-11-20 11:03:21 +01:00
Sebastian Rittau
006a79220f
Flake8 fixes ( #2549 )
...
* Fix over-indented continuation lines
* Fix under-indented continuation lines
* Fix whitespace around default operator problems
* Limit line lengths
* Fix inconsistent files
2018-10-24 07:20:53 -07:00
Russell Cloran
a62c6be905
Make encoding and newline optional in tempfile ( #1995 )
...
`encoding` and `newline` have a default value of `None` in stdlib, for all of
the classes/functions that take these parameters.
2018-03-28 16:41:24 -07:00
Jelle Zijlstra
26d1ff8352
add tempfile.TMP_MAX for py3 ( #1353 )
2017-05-25 19:33:05 -07:00
Jelle Zijlstra
155fdd0cd4
Fixes to tempfile stubs ( #981 )
...
Fixes #975
And a few more things I noticed while reading the tempfile docs.
In 3.5, most functions in tempfile were changed to accept either str or bytes in their prefix and suffix arguments, and return bytes or str accordingly. This seemed like a case for AnyStr.
We were missing tempdirb and tempprefixb, added in 3.5.
TemporaryFile and others were declared as returning BinaryIO, but they actually return either binary or text IO depending on the mode passed in. I changed the return type to IO[Any], similar to builtins.open.
2017-03-12 19:32:46 -07:00
Lukasz Langa
6b5c6626d6
Fixing flake8 E121, E122, E123, E124, E125, E126 errors
2016-12-19 23:53:19 -08:00
Danny Weinberg
708fd960da
Fix errors in stubs when running in strict mode ( #515 )
2016-09-02 19:04:56 -07:00
Matthias Kramm
94c9ce8fd0
Consistently use '= ...' for optional parameters.
2015-11-09 13:55:02 -08:00
Matthias Kramm
d2a3d4a4ed
Use explicit "# type: str" instead of '' shortcut.
2015-11-09 07:59:24 -08:00
Matthias Kramm
337abed05a
add (overwrite with) mypy stubs, if available
2015-09-30 09:59:44 -07:00