Sam Bull
7d2427bc52
Fix pkg_resource functions ( #5177 )
2021-04-07 19:48:51 -07:00
Mathieu Parent
cb03e90323
Allow List[str] for requests.Session.request(params=) ( #5187 )
2021-04-06 23:42:53 -07:00
Christopher Sang
390d8f4911
Fix incorrect type hint for cachetools TTLCache.expire ( #5186 )
...
`TTLCache.expire` expects a time value, not a timer function
2021-04-05 21:09:08 +03:00
dearoneesama
5a3b6c72a7
Fix redis stub hset() to allow only providing mapping ( #5168 )
...
* Fix redis stub hset() to allow only providing mapping
* Fix redis stub hset() and hmset() mapping type
2021-04-04 11:40:29 +03:00
Christopher Dignam
87bcb37d3f
[redis] add more exceptions ( #5174 )
...
* [redis] add more exceptions
2021-04-02 22:06:03 +03:00
Christopher Dignam
32f56444c0
[requests] add types for HTTPAdapter init ( #5164 )
...
* [requests] add types for HTTPAdapter init
2021-03-31 19:38:50 +03:00
Jacob Hayes
272505cf2d
Add pyfarmhash stubs ( #5139 )
...
Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com >
2021-03-27 17:35:22 -07:00
hatal175
577dbe965c
colorama stubs ( #5108 )
2021-03-27 07:52:37 -07:00
Vasily Zakharov
3774fa9e8e
Stubs for PyAudio ( #5081 )
2021-03-23 17:08:22 -07:00
hatal175
a9c517ad8e
Pysftp Stubs ( #5120 )
2021-03-23 17:07:02 -07:00
Greg Ward
e71c900906
Fix an incorrect type hint for werkzeug's BaseResponse class ( #5102 )
2021-03-22 19:37:05 -07:00
Igor Nehoroshev
022306f4d6
Fix type annotation in pkg_resources.parse_version ( #5098 )
...
Co-authored-by: Sebastian Rittau <srittau@rittau.biz >
2021-03-22 19:19:15 -07:00
Árni Már Jónsson
82cd7d22c6
add stubs for redis.lock ( #5105 )
2021-03-22 19:08:12 -07:00
Guilhem C
6170697b25
redis: add redis.client.Client method stubs ( #5110 )
...
* redis: add setnx function stubs (redis.client.Client.setnx)
* redis: add incr function stubs (redis.client.Client.incr)
2021-03-22 18:53:59 -07:00
Christopher Dignam
10da20293e
[redis] add remaining sorted set types ( #5097 )
2021-03-08 14:59:47 +01:00
Vyom Pathak
25eb12e745
Changed: Expires argument type to support datetime and int values ( #5077 )
...
Closes #5058
2021-03-04 15:21:15 +01:00
Eric Traut
e2967a8bee
Eliminated the use of "bare" TypeVars in stdlib stubs ( #5041 )
...
Eliminated the use of "bare" TypeVars (i.e. a TypeVar that appears only once) within generic methods. While not considered an error in PEP 484, these are a common source of bugs in code, and some type checkers (including pytype and pyright) flag them as errors.
Co-authored-by: Eric Traut <erictr@microsoft.com >
2021-02-27 19:43:45 -08:00
Eric Traut
4b4ced5fa0
Added missing type annotations and type arguments ( #5070 )
...
Co-authored-by: Eric Traut <erictr@microsoft.com >
Co-authored-by: Shantanu <hauntsaninja@users.noreply.github.com >
2021-02-25 15:09:58 -08:00
Guilhem C
bf583da275
redis: complete redis.utils stubs ( #5067 )
2021-02-25 12:46:12 +01:00
Jake Bailey
84daaca4d1
Add types for Flask().logger and flask.logging ( #5066 )
2021-02-24 23:22:54 +01:00
Marat Sharafutdinov
cb90edabd9
Add PKCS7 support for cryptography ( #5062 )
2021-02-24 14:37:56 +01:00
Eric Traut
a1f16da64e
Added some missing parameter annotations and type arguments detected by pyright. ( #5061 )
...
Co-authored-by: Eric Traut <erictr@microsoft.com >
2021-02-23 19:46:53 +01:00
Eric Traut
c7c025ae08
Removed a bunch of unused import symbols detected by pyright. ( #5060 )
...
Co-authored-by: Eric Traut <erictr@microsoft.com >
2021-02-23 19:46:46 +01:00
Christopher Dignam
46ac6bf87f
[redis] fix pipeline return types ( #4989 )
...
Pipeline is a subclass of Redis, but instead of the commands returning results, they return Pipeline.
2021-02-23 08:28:01 +01:00
Vyom Pathak
97f9acf4ee
Added: Static method for jwt.algorithms.RSAAlgorithm.to_jwk(...) ( #5047 )
2021-02-22 07:47:02 -08:00
Dante Camarena
1d1d35c87a
Updated descriptor.pyi in protobuf stubs. ( #5007 )
2021-02-22 15:15:44 +01:00
Guilhem C
ad2624551b
redis: complete echo command stub (redis.client.Redis.echo) ( #5033 )
2021-02-22 13:18:45 +01:00
Eric Traut
e717150b23
Suppressed error in filelock stubs ( #5039 )
...
Added a # type: ignore comment to the `timeout` property setter in filelock to suppress errors about type mismatch between setter and getter.
Co-authored-by: Eric Traut <erictr@microsoft.com >
2021-02-20 18:53:36 -08:00
Eric Traut
79113be609
Fixed a few problems with pathlib2 stub ( #5037 )
...
It was using a type alias with a forward definition and a bunch of unused imports.
Co-authored-by: Eric Traut <erictr@microsoft.com >
2021-02-20 13:13:55 -08:00
Eric Traut
08572d87d8
Fixed a problem with the openssl-python stubs ( #5038 )
...
Fixed a problem with the openssl-python stubs. It was using `unicode`, which is not defined in Python 3. I conditionalized its use based on Python version check.
Co-authored-by: Eric Traut <erictr@microsoft.com >
2021-02-20 13:00:33 -08:00
Alexander Reynolds
0b1cd59896
Updated protobuf descriptor pool ( #5018 )
2021-02-13 11:23:26 +01:00
jack1142
8f7e2216b6
Update emoji stubs to version 1.2.0 ( #5008 )
2021-02-08 18:58:30 -08:00
Dean Way
a3f5541830
auth uses PreparedRequest not Request ( #5006 )
2021-02-05 13:30:14 +01:00
Christopher Dignam
93e2806232
[redis] add overload for blpop and brpop timeout ( #4998 )
...
0 is the default value for the timeout argument for both blpop and brpop. When the timeout is `0`, the return type is non-nullable. Otherwise the return type is optional.
I tested my change with the following code
```python
from typing import Optional, Tuple
import redis
def test_blpop_timeout(r: redis.Redis) -> None:
a: Tuple[bytes, bytes] = r.blpop('')
b: Tuple[bytes, bytes] = r.blpop('',timeout=0)
c: Optional[Tuple[bytes, bytes]] = r.blpop('', timeout=1)
d: Optional[Tuple[bytes, bytes]] = r.blpop('', timeout=1.0)
def test_brpop_timeout(r: redis.Redis) -> None:
a: Tuple[bytes, bytes] = r.brpop('')
b: Tuple[bytes, bytes] = r.brpop('',timeout=0)
c: Optional[Tuple[bytes, bytes]] = r.brpop('', timeout=1)
d: Optional[Tuple[bytes, bytes]] = r.brpop('', timeout=1.0)
```
2021-02-04 20:32:34 -08:00
Nipunn Koorapati
a3b3f6845b
Allow unicode and bytes in the EnumTypeWrapper.Value classmethod ( #5004 )
...
Here is a unit test which shows that this behavior is accepted
by protobuf itself at runtime in both py2 and py3
https://github.com/dropbox/mypy-protobuf/pull/205
2021-02-04 15:03:37 +00:00
Jia Chen
ece1a3e525
Remove pyre-extensions ( #5001 )
2021-02-02 11:43:21 -08:00
Ivan Levkivskyi
2c180dd153
Revert "A temporary change for integration testing. Will be removed soon ( #4996 )" ( #4997 )
...
This reverts commit 8c0cad6e2f .
2021-02-01 21:22:12 +00:00
Ivan Levkivskyi
8c0cad6e2f
A temporary change for integration testing. Will be removed soon ( #4996 )
...
Co-authored-by: Ivan Levkivskyi <ilevkivskyi@dropbox.com >
2021-02-01 19:50:26 +00:00
Steve B
243472c9fd
Correct return type BufferedFile.read in paramiko ( #4994 )
...
According to the docs in paramiko the return type will always be bytes
```
.. note::
``'b'`` mode flag is ignored (``self.FLAG_BINARY`` in
``self._flags``), because SSH treats all files as binary, since we
have no idea what encoding the file is in, or even if the file is
text data.
:param int size: maximum number of bytes to read
:returns:
data read from the file (as bytes), or an empty string if EOF was
encountered immediately
```
2021-02-01 14:28:22 +01:00
Ivan Levkivskyi
e2fd852952
Add more consistency tests ( #4983 )
...
Follow up fo #4971
Co-authored-by: Ivan Levkivskyi <ilevkivskyi@dropbox.com >
2021-01-29 17:23:35 +00:00
Marti Raudsepp
ed26eced47
cyptography: Add default to few remaining backend= arguments ( #4982 )
...
This was changed in cryptography 3.1. Most places in typeshed were
already correct, fixed few remaining omissions.
2021-01-28 09:38:20 -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
Matthias Kramm
ec67428914
fix directory hierarchy in third_party/3/
2015-10-01 18:04:49 -07:00
Matthias Kramm
9edaf83284
Apply stub fixes from o11c.
...
These are extracted from https://github.com/JukkaL/mypy/pull/721
2015-10-01 14:53:57 -07:00