Commit Graph

429 Commits

Author SHA1 Message Date
Eric Traut
0ee7b26ce1 Contributed stubs for slugify package (#4429)
Co-authored-by: Eric Traut <erictr@microsoft.com>
Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
2020-08-10 13:34:47 -07:00
Eric Traut
9a4df32d86 Contributed stubs for cachetools package (#4422)
Co-authored-by: Eric Traut <erictr@microsoft.com>
Co-authored-by: hauntsaninja <>
2020-08-10 13:34:22 -07:00
Eric Traut
224da619f5 Contributed stubs for markdown package (#4426)
Co-authored-by: Eric Traut <erictr@microsoft.com>
Co-authored-by: hauntsaninja <>
2020-08-10 13:33:31 -07:00
Eric Traut
03a333871a Added stubs for deprecated package (#4423)
Co-authored-by: Eric Traut <erictr@microsoft.com>
2020-08-10 13:32:35 -07:00
Eric Traut
030e5ad1dd Added missing type annotations for itsdangerous. (#4416)
Co-authored-by: Eric Traut <erictr@microsoft.com>
2020-08-08 20:48:22 +02:00
Eric Traut
adcd691d93 Added missing type annotations in gflags.pyi; removed some functions and methods that no longer exist in the library. (#4417)
Co-authored-by: Eric Traut <erictr@microsoft.com>
2020-08-08 11:34:46 +02:00
Eric Traut
2fa7a8d8c3 Added missing type annotations for mock.pyi. (#4415)
Co-authored-by: Eric Traut <erictr@microsoft.com>
2020-08-08 11:33:01 +02:00
Eric Traut
de4ea8681d Removed imported symbols that are not accessed or re-exported (third_party part 4 of 4) (#4391)
* Removed imported symbols that are not accessed or re-exported from within third_party stubs (part 4). These were all identified as unused symbols by the pyright type checker and language server.

Co-authored-by: Eric Traut <erictr@microsoft.com>
2020-08-06 22:11:22 +02:00
Sam Bull
cea32bdc70 Add UserAgent attributes. (#4398) 2020-08-06 19:08:37 +02:00
Eric Traut
0b3494f712 Replaced parameter name "self" with "cls" for a few class methods (#4393)
* Replaced parameter name "self" with "cls" for a few class methods. Pyright emits a warning if a class method doesn't follow the PEP 8 standard where the first parameter is named "cls" for a class method. This change eliminates these warnings.

* Missed a file.

Co-authored-by: Eric Traut <erictr@microsoft.com>
2020-08-06 09:09:21 +02:00
Eric Traut
e17c6a752e Fixed base classes to avoid "Cannot create consistent method ordering" error. Like the Python interpreter, the pyright type checker reports an error when a class is defined in a way that a deterministic MRO cannot be established. This set of changes eliminates these errors. (#4392)
Co-authored-by: Eric Traut <erictr@microsoft.com>
2020-08-05 19:42:48 -07:00
Eric Traut
fe970d1134 Removed imported symbols that are not accessed or re-exported from within third_party stubs (part 3) (#4390)
These were all identified as unused symbols by the pyright type checker and language server. 

Co-authored-by: Eric Traut <erictr@microsoft.com>
2020-08-05 18:51:20 -07:00
Eric Traut
b3929cbcc9 Removed imported symbols that are not accessed or re-exported from within third_party stubs (part 2). (#4389)
These were all identified as unused symbols by the pyright type checker and language server.

Co-authored-by: Eric Traut <erictr@microsoft.com>
2020-08-05 18:50:31 -07:00
Eric Traut
94a7a62c65 Removed imported symbols that are not accessed or re-exported from within third_party stubs (part 1). These were all identified as unused symbols by the pyright type checker and language server. (#4388)
Co-authored-by: Eric Traut <erictr@microsoft.com>
2020-08-05 18:49:35 -07:00
Igor Nehoroshev
8ae5549b61 Add stub for typing_extensions.get_args (#4373) 2020-08-03 12:49:18 -07:00
Jaromir Latal
c96b1ae1bf [stdlib][unittest] Fix mock.call(...) types (#4374)
Co-authored-by: Jaromir Latal <jaro@fb.com>
2020-07-30 22:02:08 +02:00
Shannon Zhu
b45e6cfbf6 Make TypeAlias stub a valid annotation (#4354) 2020-07-22 17:31:21 -07:00
Jaromir Latal
09718c6a03 [requests] Add _content to Response (#4353)
Co-authored-by: Jaromir Latal <jaro@fb.com>
2020-07-22 17:46:51 +02:00
Magnus Watn
12f93797ff Change dotted_string from method to str (#4335) 2020-07-17 15:02:52 +02:00
Sebastian Rittau
5e76f51930 Upgrade to isort 5 (#4323)
This now also reformats imports not at the top of files.
2020-07-16 07:01:57 -07:00
Andre Delfino
1e0e40f61c Use Mapping for requests _Data (#4327) 2020-07-13 14:00:52 +02:00
Sebastian Rittau
209b6bb127 Remove tornado stubs (#4321)
Current tornado releases feature inline annotations and ship with
a py.typed file.
2020-07-09 07:20:11 -07:00
Jonathan Slenders
8e69672587 Fix for cryptography Extensions.get_extension_for_class. (#4320)
Co-authored-by: Jonathan Slenders <jslender@cisco.com>
2020-07-09 11:25:02 +02:00
Matan Gover
c64ecf5808 Flask.root_path cannot be None (#4319)
Extension of #2792 (see #2791). See [implementation](4e854ee496/src/flask/helpers.py (L959)).
2020-07-08 17:41:11 -07:00
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