Commit Graph

64 Commits

Author SHA1 Message Date
Jukka Lehtosalo
fe4acabdd7 Allow bytes in addition to str in google.protobuf.text_format (#5267) 2021-04-30 15:46:29 +02:00
Akuli
8b23590952 fix requests.adapters.HttpAdapter.max_retries (#5268) 2021-04-30 15:46:02 +02:00
Jukka Lehtosalo
aff821c538 Improve requests.adapters.HttpAdapter.__init__ (#5266)
The `max_retries` argument can be `None`. It's handled here as `retries`:

https://github.com/urllib3/urllib3/blob/main/src/urllib3/util/retry.py#L235
2021-04-30 14:15:13 +01:00
Sebastian Rittau
4ac3ccad45 black: enable skip_magic_trailing_comma (#5252)
* black: enable skip_magic_trailing_comma

* Remove spurious commas
2021-04-27 08:32:32 -07:00
Christopher Dignam
0f8f428e23 [redis] add type for Client.lock (#5176) 2021-04-27 08:32:15 +02:00
Sebastian Rittau
45916045c8 Upgrade black to 21.4b0 and reformat (#5250)
This introduces newlines before decorators.
2021-04-26 13:58:27 +02:00
Nick Crews
761bd6e6b4 Add stubs for docopt package (#5248)
* Add stubs for `docopt` package

Add the single stub for the simple, but fairly well-used
[docopt](https://github.com/docopt/docopt) package.
It looks like that project is not very well maintained,
so I thought it would be easier to add the type annotations
here, as opposed to there, upstream. This has even been requested a few
times in https://github.com/docopt/docopt/issues/471. It appeared to me
that only the `docopt()` function is the public API, so I didn't include
the rest of the module's functions and attributes.
2021-04-24 23:56:55 +03:00
Anthony Sottile
b91b0615bf werkzeug.utils.redirect: location is a str (#5240) 2021-04-22 21:47:35 -07:00
Shantanu
fc660d6d41 Move typing_extensions to stdlib (#5233)
I'm not sure what the best way to do this is. This effectively orphans
types-typing-extensions, but maybe that's not really a problem. (We can
yank the package too)

See https://github.com/python/typeshed/pull/5229#issuecomment-822234125
for some details

Co-authored-by: hauntsaninja <>
2021-04-20 21:55:48 -07:00
Sebastian Rittau
f527e96dc3 Remove docutils.nodes.reference, which has no resemblance to the implementation (#5235) 2021-04-20 14:59:39 +02:00
Dominic Davis-Foster
a690a14c82 Annotate properties on exceptions in click.exceptions (#5232) 2021-04-19 18:20:43 +02:00
heroesm
2aff78dac2 Fix protobuf json_format signatures. (#5226) 2021-04-19 14:59:48 +02:00
Sebastian Rittau
4d734e38dd Add docutils definitions and (incomplete) modules (#5192) 2021-04-16 11:50:23 -07:00
Henry Schreiner
901b8cb92d fix(pathlib2): missing exist_ok argument (#5218)
See 91eafa818c/pathlib2/__init__.py (L1527)
2021-04-14 09:44:48 -07:00
Shantanu
fa9d5a5e9f future first: switch the order of some if statements (#5206)
Since we're adding this to our contribution guidelines in
https://github.com/python/typeshed/pull/5205
2021-04-11 06:44:18 -07:00
Jason Huang
087435ca65 fix(stubs/click): add the no_args_is_help argument annotaion for click (#5198) 2021-04-10 18:33:17 +03:00
dearoneesama
8eaffee63a Fix redis pipe.hset() signature (#5196) 2021-04-08 19:03:51 -07:00
hatal175
5fef564636 Protobuf text_format stubs (#5167)
Fixes #1781
2021-04-08 18:02:38 -07:00
Sorin Sbarnea
2d3bf41b18 Improve type for yaml composer (#5144) 2021-04-08 07:29:11 -07:00
Christopher Dignam
f4625cb511 [requests] add argument names for api and session methods (#5149)
Most of these types are Any, but we should now have slightly better auto complete for the argument names

Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
2021-04-08 12:24:54 +02:00
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