Commit Graph

777 Commits

Author SHA1 Message Date
Shantanu
10d3c6c325 Remove bad namedtuple to fix CI (#4684)
Co-authored-by: hauntsaninja <>
2020-10-18 00:25:09 -07:00
Christine
9a8979ec51 update init stubs for Redis and redis Connection (#4648) 2020-10-15 18:09:02 +02:00
Kaushal Rohit
b9dadee6d6 Tighten pyjwt types using cryptography stubs (#4645) 2020-10-15 13:32:54 +02:00
Kaushal Rohit
83ffaa6ff5 Added Iterable of tuples support (#4636) 2020-10-14 21:29:31 +02:00
Julien Danjou
f35e79fd24 fix(cachetools): fix decorators signature typing (#4657)
Fixes #4652
2020-10-14 17:38:30 +02:00
crusaderky
58028a95eb cachetools ttl should be float (#4668) 2020-10-14 17:31:18 +02:00
Mariam Maarouf
1dc3880400 retry: loosen type for backoff, correct type for jitter (#4659) 2020-10-12 11:42:20 -07:00
Adam Dangoor
b9c81fe2f0 Add some return type hints for methods of Werkzeug's EnvironBuilder c… (#4653) 2020-10-12 13:47:54 +02:00
Julien Danjou
7a2398df18 fix(redis): add missing __enter__ and __exit__ methods on Redis (#4655) 2020-10-12 13:47:32 +02:00
Hynek Schlawack
977179f2f0 markdown: no assumptions about ext cfg types (#4651)
`extension_configs` are by definition unpredictable and an example that
isn't str → str would be:

    extension_configs={"codehilite": {"guess_lang": False}}
2020-10-12 12:58:58 +02:00
Ethan Pronovost
d40551e000 Update protobuf ExtensionDict (#4619) 2020-10-07 16:18:51 +02:00
Kaushal Rohit
021c219e6e concurrent.futures.wait: use _Collection (#4618) 2020-10-06 17:48:40 -07:00
Kaushal Rohit
6d248e8485 Made all backends Optional (#4625)
- in accordance with changes in cryptography

Fixes #4561
2020-10-06 17:02:59 +02:00
coiax
714135f91b 🐑 Add Redis unlink function to client stubs (#4624)
Resolves #4623
2020-10-06 13:44:10 +02:00
Abraham Francis
2b08852d19 add stub for dateutils.parser.ParserError (#4616) 2020-10-05 19:45:46 -07:00
Avery
62cab2280f Add missing requests exceptions and warnings (#4617) 2020-10-05 18:22:58 -07:00
Joseph Haaga
562fdbd9df allow request.get params values to be None (#4611) 2020-10-05 08:42:07 +02:00
Shantanu
e428f2d479 pep 484: last reexports (#4609)
Co-authored-by: hauntsaninja <>
2020-10-04 23:51:04 +02:00
Shantanu
cca6e53d86 crypto: delete stubs (#4606)
Crypto is a package that comes from pycrypto, which was last updated in
2013. It proudly supports Python 2.1 through 3.3.
There's a near drop-in replacement from pycryptodome, which seems well
maintained. pycryptodome has provided stubs for the last two years.

I propose we get rid of the whole thing. pycrypto seems about as dead as
software can get. These stubs have received two fixes since 2016.

https://github.com/python/typeshed/issues/2952
https://pycryptodome.readthedocs.io/en/latest/src/vs_pycrypto.html
https://github.com/Legrandin/pycryptodome/blob/master/Changelog.rst#371-25-november-2018

Co-authored-by: hauntsaninja <>
2020-10-04 13:05:47 -07:00
Andrew Mitchell
8a1be2197d Add flask.testing.EnvironBuilder (#4602)
Resolves #4541
2020-10-04 16:18:43 +02:00
Kaushal Rohit
434379859b cryptography: Added backend types (#4601) 2020-10-04 14:45:00 +02:00
Shantanu
7afc733054 pep 484: more reexports (#4607)
There are still a couple more, but hopefully this fixes CI. It's a
little bit of a chore to track down some of these; it looks like master
differs from latest release for a number of them.

Co-authored-by: hauntsaninja <>
2020-10-03 20:22:31 -07:00
Kaushal Rohit
6e7ac975b4 concurrent.futures.wait: changed Iterable to Sequence (#4597) 2020-10-02 22:51:14 -07:00
Sebastian Rittau
2157c4a448 Fix patch() used as decorator (#4592)
Closes: #4591
2020-10-02 09:05:25 +02:00
Andrew Mitchell
8427e09424 ast.get_docstring: fix return type (#4595)
Resolves #4575
2020-10-01 18:48:09 -07:00
Shantanu
8879858871 markdown: improve preprocessors type (#4588)
* markdown: improve preprocessors type

b701c34ebd/markdown/preprocessors.py (L46)

* Apply suggestions from code review
2020-09-30 14:34:24 -07:00
Shantanu
e3889c776e pep 484: explicit reexport as intended (#4586)
See discussion on typing-sig.
This doesn't take care of some third_party libraries, will follow up on
those.

Co-authored-by: hauntsaninja <>
2020-09-30 10:04:23 -07:00
Shantanu
bf48bfd37c retry: loosen delay to float (#4583)
Caught by mypy_primer:
paasta_tools/mesos/master.py:150: error: Argument "delay" to "retry" has incompatible type "float"; expected "int"

Co-authored-by: hauntsaninja <>
2020-09-27 07:51:18 +02:00
Shantanu
12e82874d2 upgrade isort (#4576)
Co-authored-by: hauntsaninja <>
2020-09-25 13:57:15 -07:00
Shantanu
cb6549fa8f markdown: add more stubs (#4574)
Co-authored-by: hauntsaninja <>
2020-09-25 22:29:21 +02:00
Sebastian Rittau
0cd7dd7009 Fix _patch.__call__() (#4568)
_patch.call() reused the type variable _T, which is generic over
_patch. It was meant to use a separate type variable for the argument,
which is returned.

Fixes #4566
2020-09-23 14:35:19 -07:00
Sebastian Rittau
3d3dee91a3 Use overloads for Redis.sort() (#4551) 2020-09-21 20:54:46 +02:00
Rajiv Bakulesh Shah
3f53989529 Add more stubs for redis-py (#4557) 2020-09-21 15:38:59 +02:00
Sebastian Rittau
f14d6eaa89 Improve unittest.mock.patch() types (#4277) 2020-09-21 15:26:39 +02:00
Adam Dangoor
ec62f5f772 Allow Flask.Response.default_mimetype to be None (#4563) 2020-09-21 14:36:05 +02:00
turettn
f1929d9e5a cachetools: fix caching decorators return type (#4556) 2020-09-21 14:15:29 +02:00
Rajiv Bakulesh Shah
98667b18c2 Add more stubs for redis-py (#4480) 2020-09-17 16:25:16 +02:00
Omar Sandoval
7409af9f79 Add SupportsIndex stub to typing_extensions (#4442)
This was added to typing_extensions in python/typing#724.
2020-09-15 21:14:00 +02:00
Hugues
81d067618c protobuf: add serialized_options kwarg (#4531) 2020-09-14 12:59:22 +02:00
kylec1
59586848c9 yaml: Update load methods to use Text rather than str (#4533)
Yaml loading accepts bytes and unicode, either directly or via IO.
For python 3, bytes and str work fine, but for Python 2 code this is redundant and limited.
Text instead of str should make type checks more accurate.
2020-09-11 18:37:05 -07:00
Lam Son Ho
04f7d7a2fd add stubs for frozendict (#4522) 2020-09-11 10:36:57 +02:00
jack1142
28a88adf0b Update emoji stubs (#4516) 2020-09-08 20:24:32 +02:00
Sam Bull
ea52d0b0a0 Fix werkzeug set_cookie(). (#4509) 2020-09-01 09:08:07 -07:00
Shantanu
48c8939ce6 concurrent.futures: update for py39, minor fixes (#4503)
Note the new parameter doesn't actually exist on the base class, even
though it's documented as that being the case. Asked about it in https://bugs.python.org/issue39349

Co-authored-by: hauntsaninja <>
2020-08-31 22:04:49 +02:00
Sebastian Rittau
3c20675813 Remove pytest_mock (#4478)
pytest-mock is now type annotated, which makes typeshed's annotations
obsolete. See pytest-dev/pytest-mock#152.
2020-08-29 14:47:34 -07:00
Jukka Lehtosalo
5be9c91518 freezegun: Fix __exit__ and remove union return types (#4491)
These caused false positives, for example in code like this:

```
    with freeze_time(None) as ft:  # False positive here
        ft.tick(3)  # False positive here
```
2020-08-28 16:50:05 +01:00
Jukka Lehtosalo
3e966524b7 Add back six.moves.cStringIO (Python 3) (#4490)
This was accidentally removed in #4287.
2020-08-28 16:49:56 +01:00
Jelle Zijlstra
5f9fd3d127 upgrade black version (#4486)
Manually removed a number of trailing commas to prevent black from unnecessarily
exploding some collections.
2020-08-26 18:36:01 +02:00
Cerek Hillen
142aed3838 type annotation for Timestamp and Duration (#4471) 2020-08-25 23:29:34 -07:00
Jukka Lehtosalo
ab0f5519a9 Add back six.moves.range (Python 3) (#4481)
This was accidentally removed in #4287.
2020-08-25 16:42:15 +01:00