Jürgen Gmach
92f91ddfe8
Add typing for werkzeug.utils.secure_filename ( #4308 )
2020-07-03 15:08:03 +02:00
Julian Mehnle
6d1c59d238
pymysql.err.Warning multiple-inherits from builtins.Warning and MySQLError. (#4303 )
...
Previously we declared it as single-inheriting from only `MySQLError`.
2020-07-02 19:53:38 -07:00
John Snow
f26a82436c
requests: add type hint for Session.send() ( #4302 )
...
This takes a PreparedRequest and returns a Response.
See https://github.com/psf/requests/blob/master/requests/sessions.py#L614
2020-07-01 15:31:37 -07:00
Federico Bond
4225ab2496
Export requests.utils module ( #4301 )
2020-07-01 10:55:55 -07:00
Christine
8cf3cd398e
[redis] Update hset signature to include mapping kwarg ( #4293 )
2020-06-30 09:41:01 +02:00
Nipunn Koorapati
ad8fd9dba7
Add typing for google protobuf mapping containers ( #4265 )
2020-06-30 09:37:50 +02:00
Sebastian Rittau
6bffc6534b
Add nmap type information ( #4292 )
...
Author: Philipp Hahn <hahn@univention.de >
Co-authored-by: Philipp Hahn <hahn@univention.de >
2020-06-29 18:52:41 +02:00
Jelle Zijlstra
0142a87da8
adjust isort config ( #4290 )
...
Fixes #4288 .
- Default imports to THIRD_PARTY, so in effect we merge the FIRST_PARTY and THIRD_PARTY stubs. This means import order is no longer affected by whether typing_extensions is installed locally.
- Treat typing_extensions, _typeshed and some others as standard library modules.
Note that isort master is very different from the latest release; we'll have to do something
different if and when the next isort release comes out.
2020-06-29 00:00:21 -07:00
Jelle Zijlstra
5d553c9584
apply black and isort ( #4287 )
...
* apply black and isort
* move some type ignores
2020-06-28 13:31:00 -07:00
Vishal Kuo
986eff04c3
[redis] replaces _Str with _Value as variable info ( #4281 )
2020-06-27 13:04:20 -07:00
Vishal Kuo
d4a2cf3da4
[redis] adds additional sorted set type information ( #4278 )
2020-06-27 00:14:42 +02:00
Mark Mendoza
1d16e6c49e
Replacing Callable[[T], T] with callback protocol in click ( #4045 )
2020-06-26 16:48:40 +02:00
Milap Sheth
9b3edda33b
Fix unittest stub issues reported by mypy stubtest ( #4248 )
...
Co-authored-by: Shantanu <>
2020-06-21 15:09:17 -07:00
Mikhail Golubev
30bbf02cf1
Add PEP 613 TypeAlias stub to typing_extensions ( #4243 )
2020-06-19 14:49:04 +02:00
Jakub Stasiak
37be717886
Add stubs for cryptography's Fernet.[encrypt|decrypt]_at_time() ( #4238 )
2020-06-17 16:11:42 +02:00
Sebastian Rittau
51cf2f51b8
Add IO protocols to _typeshed ( #4230 )
2020-06-14 20:44:48 +02:00
Sebastian Rittau
89d3a55f1a
Preparations for the Big Reformat ( #4228 )
...
A few comments between imports were removed or moved to the top of the
import block, due to behavioral differences between black and isort. See
psf/black#251 for details.
In two instances @overloads at the top of the file needed to be moved
due to psf/black#1490 .
2020-06-14 07:58:26 -07:00
Jelle Zijlstra
44a852dff5
Literal: always import from typing_extensions for simplicity ( #4219 )
2020-06-10 21:23:58 -07:00
Dmitry Marakasov
c14e56bcbb
Add rv annotaton to send_static_file() ( #4216 )
2020-06-10 22:32:27 +02:00
Eric Masseran
40f6856a80
Update the InternalServerError constructor type ( #4210 )
2020-06-09 12:11:30 +02:00
Rich Li
415da3ddd4
Redis client and others ( #4178 )
...
Co-authored-by: Richard Lindsley <rich.lindsley@gmail.com >
2020-06-06 08:07:45 -07:00
Sebastian Rittau
1f82564ee2
Move wsgiref.types to _typeshed.wsgi ( #4175 )
...
Re-export the types from wsgiref.types for now to avoid breaking
existing code. wsgiref.types should be removed eventually.
Also, reduce the boilerplate description in _typeshed/wsgi.pyi as it
mirrors the description in _typeshed/__init__.pyi.
2020-06-04 15:38:45 -07:00
Sebastian Rittau
eea9be6e73
Add a _typeshed.pyi file and a PathLike alias ( #4161 )
2020-06-04 14:06:43 +02:00
Willy Wu
ec3370b2b0
datetimerange: Allow datetime.datetime in addition to str ( #4167 )
...
Closes : #4166
2020-06-04 13:23:21 +02:00
Sebastian Rittau
a913af9523
flake8: Enable F811 ( #4158 )
2020-06-02 14:08:54 -07:00
Steve Dignam
10b87bdfbb
redis: add more precise types for hash commands ( #4148 )
2020-06-01 05:33:03 +02:00
Sam Bull
5c1806ab88
Add more annotations to jinja2.utils. ( #4004 )
2020-05-27 20:28:56 -07:00
Kunal Arya
639771a22a
Broaden _Serialized type in protobufs to ByteString. ( #3890 )
2020-05-27 19:53:58 -07:00
Julin S
851efa550e
add stubs for language models ( #3848 )
...
* add stubs for language models
* fix syntax error in __init__.pyi
* fix syntax error in universaldetector.pyi
* remove erroneous imports
* delete cli directory
* make tuple types variable length
2020-05-27 19:43:04 -07:00
Sebastian Rittau
694fa80596
Add dateparser module ( #4106 )
...
Based on PR 3704 by @xcthulhu (Matthew Doty)
2020-05-27 18:53:16 -07:00
Rune Tynan
fcdfacf944
Fix stubtest failures for socketserver on windows ( #4103 )
2020-05-27 19:34:35 +02:00
Alexandre Yang
a8834fcd46
Add pyVmomi stubs ( #3921 )
2020-05-26 12:04:56 +02:00
Markus Wamser
1996361adc
cryptography: add signature of Prehashed ( #4048 )
...
* cryptography: add signature of Prehashed
* cryptography: modify signature of Prehashed
mark internal attributes as undocumented
add public attribute digest_size
* cryptography: modify signature of Prehashed
drop Optional from argument of __init__
2020-05-25 15:36:54 -07:00
Shantanu
9b89423f02
chardet: add default value ( #4074 )
...
Co-authored-by: hauntsaninja <>
2020-05-24 18:48:24 -07:00
Shantanu
8cf04f3a74
boto.compat, base64: fix version handling of (en|de)codebytes ( #4070 )
...
Co-authored-by: hauntsaninja <>
2020-05-24 18:44:43 -07:00
Jakub Stasiak
8827f84763
Clarify that cryptography's Fernet accepts text keys ( #4061 )
...
* Clarify that cryptography's Fernet accepts text keys
* simplify code
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com >
2020-05-24 18:44:36 -07:00
Sebastian Rittau
be016c6793
Add retry_after to TooManyRequests and ServiceUnavailable ( #4059 )
...
Added in werkzeug 1.0.0
While the implementation accepts any value for retry_after, the docstring
allows only datetime and int. Using any other value could lead to an
invalid HTTP response.
2020-05-23 13:39:48 -07:00
Jeff Hunter
e1e99245bb
google.protobuf.message.Message.ParseFromString() returns an int ( #4053 )
2020-05-21 19:15:40 +02:00
Markus Wamser
960c4eb42d
cryptography: fix signature of ECDSA ( #4049 )
2020-05-20 18:58:21 -07:00
Mark Mendoza
092fdb2ca5
[pyre] Fix typo in click/decorators ( #4044 )
2020-05-20 00:55:34 +02:00
Razzi Abuissa
18aa8e0adb
Add cli field to flask helper _PackageBoundObject ( #4040 )
2020-05-18 23:14:41 +02:00
Nipunn Koorapati
1436181587
Make EnumTypeWrapper generic in google.protobuf.internal ( #3995 )
...
This is necessary so that mypy-protobuf can autogenerate NewType
wrappers around the int values of the enum!
2020-05-18 21:42:47 +02:00
Nipunn Koorapati
f0927787f0
Update type var typing on protobuf message.pyi ( #3996 )
...
Add support for message type var generics
2020-05-18 11:59:37 -07:00
Razzi Abuissa
949378fdd9
flask: Add types for cli_group argument to flask.Blueprint ( #4011 )
...
* Add types for cli_group argument to flask.Blueprint
* Use private _Sentinel type for default argument to Blueprint cli_group
2020-05-18 11:58:42 -07:00
Graham Bleaney
6dca3f7fc5
New attributes and types on HTTPServerRequest ( #3971 )
...
Porting type information directly from the tornado repository:
712d61079d/tornado/httputil.py (L340-L384)
2020-05-14 08:20:24 -07:00
Shantanu
0630c4b1fd
unittest.mock: fix MRO of Mock ( #3990 )
...
* unittest.mock: fix MRO of Mock
* Make consistent
Co-authored-by: hauntsaninja <>
2020-05-14 08:57:50 +02:00
Sam Bull
6932ff26c5
Set default for newstyle ( #3962 )
...
* Set default for newstyle
* Change default values to ...
2020-05-13 18:01:30 -07:00
Graham Bleaney
66cd36268a
Refine types on tornado.web.RequestHandler ( #3970 )
...
This diff refines the types on `RequestHandler` by porting types directly from the `tornado` repo.
2020-05-08 20:52:14 +02:00
Bruce Merry
c81b3cfe59
Fix some incorrect redis Text annotations ( #3969 )
...
I've changed some instances of `Text` to `_Key` so that bytes will be
accepted as well. I'm not sure if they should be `_Str` instead. The
existing annotations seem to use a mix of the two. _Str is a better
reflection of what redis-py will accept (any arguments that it passes
through to the redis server can be _Str and it'll convert to bytes); but
passing an int or float where a key is expected may be a code smell.
2020-05-07 19:32:56 -07:00
Ivan Levkivskyi
5342d66dcc
Fix assert_has_calls() signature ( #3967 )
...
See the docs https://docs.python.org/3/library/unittest.mock.html#unittest.mock.Mock.assert_has_calls
2020-05-05 19:20:56 +01:00