Jonathan Slenders and Jelle Zijlstra
337c382196
Added termios.error ( #2951 )
2019-05-04 16:13:53 -04:00
Jon Dufresne and Jelle Zijlstra
910c71050d
Update Black URL ( #2950 )
2019-05-04 11:42:44 -04:00
Jelle Zijlstra and Sebastian Rittau
8bd744a38f
fix type of msg argument to HTTPRedirectHandler.redirect_request ( #2949 )
...
It's not really documented (https://docs.python.org/3/library/urllib.request.html#urllib.request.HTTPRedirectHandler.redirect_request ), but logically a message is a str, and reading the code for the stdlib confirms that it's intended to be a str.
2019-05-03 20:44:56 +02:00
Utkarsh Gupta and Jelle Zijlstra
4d61442004
click/types.pyi: Add case_sensitive wrt click 7.0 ( #2948 )
...
Fixes #2942
2019-05-03 10:44:36 -04:00
Callum Ryan and Sebastian Rittau
1726b31013
Change WatchedFileHandler to inherit from FileHandler ( #2947 )
2019-05-02 21:55:56 +02:00
Utkarsh Gupta and Jelle Zijlstra
df953ca385
config.pyi: Return a Thread instance ( #2945 )
...
Fixes #2938
2019-05-02 06:22:51 -04:00
Scott Belden and Sebastian Rittau
556f354e1e
add BadRequestKeyError ( #2944 )
2019-05-02 11:45:04 +02:00
Jia Chen and Sebastian Rittau
cda204a151
Remove MutableMapping from requests.Session.cookies's type ( #2946 )
2019-05-02 10:39:42 +02:00
Utkarsh Gupta and Jelle Zijlstra
6d8e610d75
itertools.pyi: Replace Iterable with Iterator. ( #2943 )
...
Fixes #2931
2019-04-30 14:53:59 -07:00
Brandt Bucher and Sebastian Rittau
1fddec3f90
Positional-only arguments for built-in functions. ( #2921 )
2019-04-30 11:22:25 +02:00
Sushain Cherivirala and Sebastian Rittau
67b42aff6b
Add initializer for http.cookiejar.Cookie ( #2932 )
2019-04-29 10:34:28 +02:00
Jelle Zijlstra and Sebastian Rittau
ff650d3275
socket: add .set_inheritable() ( #2935 )
2019-04-28 17:13:20 +02:00
ijl and Jelle Zijlstra
5acc22d82a
Specify default = ..., positional-only for orjson API ( #2936 )
2019-04-27 11:09:26 -07:00
Benjamin Peterson and Ivan Levkivskyi
4e572ae6a3
Remove format_map from Python 2 unicode. ( #2933 )
2019-04-24 00:42:27 +01:00
Rebecca Chen and Sebastian Rittau
fd57aee5da
Make shlex.shlex convertable to a list in Python 2. ( #2927 )
...
This simply copies the relevant lines over from the Python 3 stub.
2019-04-21 09:21:00 +02:00
Stephen Thorne and Jelle Zijlstra
97240083c4
Correct the type signature of assertRaisesRegexp ( #2926 )
...
assertRaisesRegexp is the old name of assertRaisesRegex, they are the
same, just that the old one is deprecated.
2019-04-18 20:31:00 -07:00
Yegor Roganov and Jelle Zijlstra
4cd9a8ef91
Make loop optional in asyncio.Queue ( #2923 )
...
Default value is `None`, so `loop` should be optional.
2019-04-14 12:43:33 -07:00
Utkarsh Gupta and Jelle Zijlstra
cf88c79a93
locale.format_string takes strings and numbers, too. ( #2922 )
...
Fixes #2879
2019-04-14 09:30:07 -07:00
Philipp Schrader and Jelle Zijlstra
d9c5422ebf
Add stub for multiprocessing.Value.get_lock() ( #2920 )
...
I also noticed that the "lock" parameter for Value's __init__ was
incomplete. The parameter also accepts lock objects directly.
https://docs.python.org/3.7/library/multiprocessing.html#multiprocessing.Value
Fixes #2917
2019-04-13 11:35:52 -07:00
Michael Lee and Sebastian Rittau
efb67946f8
Use variable annotations everywhere ( #2909 )
2019-04-13 10:40:52 +02:00
秋葉 and Jelle Zijlstra
b3c76aab49
KeysView and ItemsView should accecpt Iterable argument in set operation ( #2906 )
2019-04-12 23:05:58 -07:00
Michael J. Sullivan and Jelle Zijlstra
f06f2e97bb
Make os.altsep Optional on non-win32 platforms ( #2918 )
...
Keep it str on win32 to avoid breaking win32-specific code that relies
on it.
2019-04-12 23:00:19 -07:00
Sebastian Rittau and Guido van Rossum
bd10d8aad4
Add @typing.type_check_only ( #2679 )
...
Cf. python/typing#597
2019-04-12 15:32:22 -07:00
Brandt Bucher and Sebastian Rittau
4230e6f313
Fix quit's argument and return types to match those of exit. ( #2915 )
...
Fixes #2912 .
2019-04-12 16:57:26 +02:00
Masashi SHIBATA and Sebastian Rittau
c85fed8d98
Fix TextTestResult and TextTestRunner in unittest ( #2910 )
...
Co-Authored-By: c-bata <c-bata@users.noreply.github.com >
2019-04-12 12:50:12 +02:00
Sergey Machulskis and Sebastian Rittau
bec2fef7fa
threading.Lock issue when using it with ExitStack ( #2908 )
...
* Make threading primitives ContextManagers
* Make catch_warnings ContextManager
* Make SMTP ContextManager
* Fix type of exc_type for SMTP
2019-04-11 21:39:17 +02:00
Michael Lee and Sebastian Rittau
b87064a274
Add type hints for the turtle module ( #2905 )
2019-04-11 08:00:53 +02:00
Michael J. Sullivan and GitHub
0350e9fa89
Fix some issues with __round__ ( #2907 )
...
In python 3, add an overload for there being no digits argument
and make it return int.
In python 2, __round__ doesn't exist and SupportsRound doesn't exist
in the typing module. Use SupportsFloat for python 2 round().
Remove decimal's __round__ overload that takes None, since it doesn't exist
2019-04-09 11:45:10 -07:00
Rebecca Chen and Sebastian Rittau
50a661afed
Complete the stub for _thread.pyi. ( #2900 )
...
Definitions based on https://docs.python.org/3/library/_thread.html .
2019-04-09 20:02:04 +02:00
Anthony Sottile and Jelle Zijlstra
cfa65b831b
flask.Flask.run: port can be str ( #2903 )
...
https://github.com/pallets/flask/blob/86bf9dca72cd188813e26ef5dd972101ef8983cf/flask/app.py#L933
2019-04-08 11:41:37 -07:00
Josh Morton and Sebastian Rittau
d46d36b7d7
Add six.moves types for email_mime sources. ( #2902 )
...
As a followup to the work done in #2767 and #2830 , and to address a
piece of #66 , most of the email_mime submodules aren't typed in six
under python2, only python3. Now they are.
2019-04-08 19:56:29 +02:00
Jelle Zijlstra and Sebastian Rittau
ce2b8a838c
reword "What to include" ( #2861 )
2019-04-08 19:02:01 +02:00
Rune Tynan and Ivan Levkivskyi
cb7de8adfa
Fix typo in FrameType 3.7 attributes ( #2899 )
2019-04-03 22:52:34 +01:00
Rebecca Chen and GitHub
a651e2f3cd
Update pytype_test to remove now-unnecessary parse-only functionality. ( #2897 )
...
With today's release, pytype is able to fully load
stdlib/3/collections/__init__.pyi, so the test no longer needs the
ability to partially parse stubs using the pytd tool. Removing this
functionality allows the test code to be simplified considerably.
2019-04-03 12:47:20 -07:00
Shahar Evron and Sebastian Rittau
0f5302b3b5
Accept bytes as 1st argument of simplejson.loads ( #2896 )
2019-04-02 16:40:59 +02:00
Alex Chamberlain and Sebastian Rittau
f11d061849
Add mmap as a valid buffer type. ( #2895 )
2019-03-30 18:47:30 +01:00
Brendan Long and Sebastian Rittau
d371513b80
werkzeug: ETagRequestMixin's functions are properties ( #2894 )
...
This was causing mypy to incorrectly flag reads of these properties
and complain that they're Callable, which is incorrect.
2019-03-30 18:44:10 +01:00
Rebecca Chen and Sebastian Rittau
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
Christopher Dignam and Sebastian Rittau
f7c00b8b33
yaml: add full_load and full_load_all stubs ( #2892 )
2019-03-29 08:26:13 +01:00
William Ayd and Jelle Zijlstra
bce70d1ca6
Added excepthandler to ast stubfiles ( #2891 )
2019-03-28 08:23:56 -07:00
Michael J. Sullivan and Jelle Zijlstra
cc596aefbc
Add a type: ignore as a hacky workaround for some mypy bazel issues ( #2887 )
2019-03-27 15:10:47 -07:00
Chen Li and Sebastian Rittau
598d0d6ae1
[builtins] Add 'AST' type to 'source' parameter for 'compile()' ( #2889 )
2019-03-27 08:29:16 +01:00
Rebecca Chen and GitHub
a1d1870779
Fix a py2 parameter type in string.Template.(safe_)substitute. ( #2888 )
...
Context: https://github.com/python/typeshed/pull/2871#issuecomment-476806895
2019-03-26 23:25:15 -07:00
Michael J. Sullivan and GitHub
c526975a1b
Add overloads for min/max that don't take default ( #2885 )
...
PR #2833 introduced more flexible handling for the type of the default
parameter, but the extra type variable caused some issues. Add another
overload for the case where there is no default param.
This is I think related to the issues we have had with `get` recently?
2019-03-25 15:38:21 -07:00
Hynek Schlawack and Sebastian Rittau
7646506c14
Add missing dateutil.tz.UTC ( #2883 )
...
Co-Authored-By: hynek <hs@ox.cx >
2019-03-22 21:42:55 +01:00
yoshiyuho and Sebastian Rittau
0f1e453606
Fix werkzeug.UserAgentMixin annotation ( #2881 )
2019-03-22 08:24:44 +01:00
Jeff and Sebastian Rittau
168a968564
[third_party/click] add Exit exception definition ( #2880 )
2019-03-21 23:08:59 +01:00
Chen Li and Sebastian Rittau
094974c3f5
[re] Add attribute '_pattern_type' to re. ( #2877 )
...
This is only available before python 3.7 based on:
https://github.com/python/cpython/blob/3.6/Lib/re.py#L283
https://github.com/python/cpython/blob/3.7/Lib/re.py
2019-03-20 01:20:24 +01:00
wouter bolsterlee and Sebastian Rittau
afe665690c
Add missing BaseException.__suppress_context__ attribute ( #2876 )
...
See also PEP 415: https://www.python.org/dev/peps/pep-0415/
Fixes #2875 .
2019-03-16 22:16:01 +01:00
Rebecca Chen and Sebastian Rittau
7c80c52a7a
Add missing class pdb.Pdb. ( #2872 )
...
Based on: https://docs.python.org/3/library/pdb.html#pdb.Pdb ,
with the one difference that the `skip` argument to the
constructor is present in 2.7 despite being listed as new in 3.1.
2019-03-16 22:14:16 +01:00