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
Rebecca Chen and Sebastian Rittau
e541cdd1a6
Add unicode support to py2 string.Template. ( #2871 )
2019-03-16 22:12:36 +01:00
Rebecca Chen and Sebastian Rittau
03878d732a
Add attribute queue.Queue.queue. ( #2870 )
2019-03-16 22:11:48 +01:00
Rebecca Chen and Sebastian Rittau
437d8e0ddd
Add tarfile.filemode. ( #2869 )
...
This function is defined up to Python 3.7 (albeit deprecated in Python 3).
2019-03-16 09:45:01 +01:00
Rebecca Chen and Sebastian Rittau
8c252052f9
Move pydoc from 2/ to 2and3/. ( #2873 )
2019-03-16 09:37:24 +01:00
Rebecca Chen and Sebastian Rittau
4743d2521a
Remove asyncio.tasks from the pytype blacklist. ( #2874 )
...
With version 2019.03.15, pytype is able to parse this file.
2019-03-16 09:35:30 +01:00
Rebecca Chen and GitHub
45e52de188
Speed up pytype_test by reducing subprocess calls. ( #2868 )
...
Speeds up pytype considerably by directly calling pytype.io.parse_pyi
rather than running `pytype --parse-pyi` in a subprocess.
The subprocess logic is still required to handle the one pyi file
marked `# parse only` in the pytype blacklist. Once
https://github.com/google/pytype/issues/242 is fixed, the test code
can be cleaned up considerably.
2019-03-14 19:04:40 -07:00
JinyuanShanghai and Sebastian Rittau
15e1f76f61
move pycurl.pyi from 2 to 2and3 ( #2867 )
2019-03-14 23:14:52 +01:00
Rebecca Chen and Sebastian Rittau
7b6bb60fe2
Remove an unused import from stdlib/3/importlib/__init__.pyi. ( #2866 )
...
pytype has trouble resolving unused imports, since it looks at usage
to distinguish submodules from other imports.
2019-03-14 19:51:19 +01:00
Cary Yang and Jelle Zijlstra
66bdf523ff
Update signature of webbrowser.register for Python 3.7 ( #2865 )
2019-03-14 09:29:17 -07:00
Sebastian Rittau and Jelle Zijlstra
26fefcc704
Use protocol for print() file argument ( #2848 )
...
Also, use object instead of Any for values list
2019-03-12 19:26:32 -07:00
Tom Briggs and Sebastian Rittau
cd088c44d2
Click: add 'length' and 'label' properties to ProgressBar. ( #2860 )
2019-03-12 20:58:40 +01:00
Gabriel Corona and Sebastian Rittau
d595a46912
Fix several Flask types ( #2858 )
...
* Flask.static_folder is Optional
* Fix some types in Flask
2019-03-12 20:57:37 +01:00
Luke Granger-Brown and Jelle Zijlstra
b71ccbb136
Add timeit.main ( #2731 )
...
This function is exposed to external users of timeit, and can come in useful if you merely want to provide defaults to timeit.main (albeit awkwardly).
2019-03-12 09:37:10 -07:00
Guido van Rossum and Sebastian Rittau
6b6d8c82ac
Support new ast features and node types introduced in Python 3.8 ( #2859 )
...
Had to adjust the return type of ast.parse() from Module to AST, which
is more truthful anyways.
2019-03-12 16:34:56 +01:00
Chen Li and Sebastian Rittau
5918098576
[traceback] Expose print_list method in traceback for python3. ( #2837 )
2019-03-12 00:11:40 +01:00
Vasily Zakharov and Sebastian Rittau
34cc5545fe
email.mime.application.MIMEApplication expects data to be bytes, while it should be Union[str, bytes] ( #2855 )
...
Fixes #2831
2019-03-11 20:42:55 +01:00
Vasily Zakharov and Sebastian Rittau
e4e19d6e98
Add email.charset.SHORTEST, QP, BASE64 to the stub for Python 2 ( #2857 )
...
Also mark Python 3 constants as undocumented.
Fixes #2830
2019-03-11 20:41:19 +01:00
Vasily Zakharov and Sebastian Rittau
08555f80d1
Make vars arguments Optional, as they default to None ( #2853 )
...
Closes #2847
2019-03-11 15:12:35 +01:00
Lawrence Chan and Sebastian Rittau
4856458251
Add logging.Formatter.formatMessage method ( #2850 )
2019-03-11 08:46:21 +01:00
Jelle Zijlstra and Sebastian Rittau
832bf52c28
asyncio: make type alias private and CamelCase ( #2849 )
2019-03-11 08:43:00 +01:00
Sebastian Rittau and Jelle Zijlstra
6f00053511
Add stubs for bleach ( #2709 )
...
* Add stubs for bleach
* Support Python 2 for bleach
* Add missing imports
2019-03-10 21:08:46 -07:00
Chen Li and Sebastian Rittau
012901e318
[asyncio] Change _set_running_loop(loop: AbstractEventLoop) to _set_running_loop(loop: Optional[AbstractEventLoop]) ( #2828 )
2019-03-11 00:29:53 +01:00
Gleb Chipiga and Sebastian Rittau
6282e9f59f
Update asyncio streams stub ( #2845 )
...
* Add is_closing and wait_closed methods to StreamWriter [Python 3.7]
* Update type of open_unix_connection and start_unix_server path parameter [Python 3.7]
2019-03-11 00:15:03 +01:00
Gleb Chipiga and Sebastian Rittau
bf370b5908
Update attr stubs to 19.1.0 ( #2846 )
2019-03-11 00:11:26 +01:00
Eric Traut and Sebastian Rittau
ef5fc92b98
Added missing default value annotation ( #2841 )
2019-03-10 12:19:29 +01:00
Eric Traut and Sebastian Rittau
06c682449f
Fix inconsistent self/cls parameter names ( #2838 )
...
Fixed several inconsistent parameter names so all instance methods take 'self' and all class methods take 'cls'. This avoids warnings or errors from linting tools that enforce standard naming conventions.
2019-03-10 03:17:55 +01:00
Eric Traut and Sebastian Rittau
20b3b54460
Changed parameter name of several methods in logging module from 'lvl' to 'level' to match the implementation. Use in a keyword arg of 'lvl' results in runtime errors. ( #2840 )
2019-03-10 03:04:31 +01:00
Eric Traut and Sebastian Rittau
748ad3d21f
Removed extraneous import statement that was redefining three symbols in markupsafe/__init__.py. This redefinition triggered type checking/linting errors. ( #2842 )
2019-03-10 02:57:54 +01:00
Brandt Bucher and Jelle Zijlstra
ab4c262043
Add isascii methods to str, bytes, and bytearray [Python 3.7]. ( #2834 )
2019-03-08 11:07:28 -08:00
herr kaste and Sebastian Rittau
4dcd516caa
Improve min/max ( #2833 )
...
* For min/max return Union type if default given
* For min/max mark keyword only arguments
* Also mark positional arguments
2019-03-08 19:25:34 +01:00
Pascal Corpet and Sebastian Rittau
979534c764
Prefer Mapping to Dict for input of csv DictWriter methods. ( #2829 )
2019-03-07 15:04:56 +01:00