Rebecca Chen and Sebastian Rittau
77e4d5d5a8
Add six.moves.urllib_request and six.moves.urllib_response. ( #2455 )
2018-09-13 22:01:56 +02:00
Teddy Sudol and Sebastian Rittau
b40cae139f
Add more complete type hints for pkg_resources. ( #2433 )
...
The current file only covers pkg_resources/__init__.py.
pkg_resources/py31compat.pyi is used by setuptools, for example.
2018-09-13 22:00:04 +02:00
Jon Dufresne and Sebastian Rittau
47f22a341e
Add def __getattr__(name) -> Any: ... to all docutils stubs ( #2439 )
...
The stubs are very incomplete causing false positive when used. Add a
fallback to until they can become more complete.
2018-09-13 21:59:13 +02:00
Ivan Levkivskyi and GitHub
75e13a0f36
Add Final to typing_extensions ( #2453 )
2018-09-13 15:07:42 +01:00
Sebastian Rittau and Jelle Zijlstra
27514df2bd
Fix annotation of boto Key.set_contents_from_string ( #2445 )
...
Closes #1552
2018-09-11 08:25:25 -07:00
Sebastian Kreft and Jelle Zijlstra
c96812425a
Overload the definitions of dataclasses.asdict and dataclasses.astuple ( #2422 )
2018-09-06 22:14:28 -07:00
Michael J. Sullivan and GitHub
55b9aaf916
Add Optional to typed_ast's arguments.type_comments ( #2430 )
...
This covers the case where some but not all arguments have a `# type:` comment.
2018-09-06 18:56:10 -07:00
Jelle Zijlstra and Rebecca Chen
9d62d6d5c5
fix __metaclass_ references ( #2402 )
2018-09-06 18:24:03 -07:00
Ivan Levkivskyi and Jelle Zijlstra
8ed0159445
Remove duplicate method definitions in importlib and jinja2 ( #2427 )
2018-09-04 07:50:47 -07:00
Jelle Zijlstra and GitHub
2e1c81684e
fix duplicate definitions in tornado ( #2424 )
...
Fixes #2423 .
I followed https://github.com/tornadoweb/tornado/blob/master/tornado/httpclient.py and kept the `@property` where it exists in the implementation and the attribute where it doesn't.
2018-09-03 16:39:51 -07:00
Teddy Sudol and Jelle Zijlstra
c52c59f521
Remove duplicate adapters import. ( #2414 )
...
This causes an error in pytype.
2018-08-23 17:01:47 -07:00
Tomasz Trębski and Jelle Zijlstra
50a62b6a6a
Improve werkzeug/exceptions typings ( #2405 )
2018-08-22 08:49:11 -07:00
Teddy Sudol and Jelle Zijlstra
2cd0aa16b5
Fix pkg_resources.pyi formatting ( #2396 )
2018-08-21 21:51:04 -07:00
Sebastian Rittau and Jelle Zijlstra
a2676ec972
Improve werkzeug stubs ( #2391 )
2018-08-17 08:35:14 -07:00
Michael J. Sullivan and Jukka Lehtosalo
d45fc3daaf
Fix typed_ast's Num type ( #2387 )
2018-08-16 11:36:13 +01:00
Brandon Lin and Jelle Zijlstra
700efc43dd
add missing stubs in cryptography rsa/serialization ( #2376 )
2018-08-15 20:50:56 -07:00
MinJune Kim and Jelle Zijlstra
dc6d1ff8d3
Re-add .resolve() method to package_resources.Entrypoint ( #2385 )
...
Fixes #1463
2018-08-15 10:40:45 -07:00
stevenjackson121 and Jelle Zijlstra
80a0a75f5f
Add stubs for contextvars backport (3.5 and 3.6) ( #2378 )
...
* Add stubs for contextvars backport (3.5 and 3.6)
* Add contextvars to tests/check_consistent.py
2018-08-14 08:05:02 -07:00
Devin Fee and Jelle Zijlstra
047040887b
fix: list_commands returns strings ( #2372 )
...
list_commands previously returned `Iterable[click.Command]` and now returns `Iterable[str]` to comply with the method's return value.
2018-08-09 10:24:23 -07:00
Michael J. Sullivan and Ivan Levkivskyi
0f6f2abc30
Add another undocumented mypy_extension that we are trying out ( #2374 )
2018-08-09 15:57:46 +01:00
Ville Skyttä and Jelle Zijlstra
5b2c8dc883
concurrent.futures: Sync with Python 3.7 ( #2343 )
2018-08-08 08:26:01 -07:00
Max Murin and Ivan Levkivskyi
e9a7f7cc0d
Add missing protobuf stubs ( #2368 )
...
Added a few stubs to Protobuf descriptors. These appear in descriptor.py. These are all present in https://github.com/google/protobuf/blob/master/python/google/protobuf/descriptor.py .
2018-08-08 09:40:40 +01:00
Brandon Lin and Jelle Zijlstra
7c263e3935
add set_time to OpenSSL.crypto.X509Store ( #2367 )
2018-08-07 22:22:26 -07:00
Michael J. Sullivan and Jelle Zijlstra
e4656b1ac6
Add undocumented trait decorator to mypy_extensions ( #2369 )
...
`@trait` has special meaning to the experimental mypyc compiler,
slightly restricting the behavior of the class in exchange for
allowing it to be multiply inherited from.
2018-08-07 22:18:00 -07:00
Daniel Li and Jelle Zijlstra
631d2768d6
Add stub for pathlib2 on Python 2.7 ( #2351 )
...
pathlib2 is the Python 2.7 backport of the pathlib module from Python 3.
Hence we use the same stub file for both.
The maintainer of pathlib2 granted permission for stubs to be added in
mcmtroffaes/pathlib2#44 .
2018-08-07 10:27:18 -07:00
Gary van der Merwe and Jelle Zijlstra
c1f89a90b4
Make dataclasses available as a backported third_party library. ( #2354 )
2018-08-07 10:04:33 -07:00
Guido van Rossum and Jelle Zijlstra
1965e9dd22
Add stub for toml ( #2355 )
...
See https://github.com/uiri/toml/issues/178
2018-08-02 23:02:49 -07:00
Michael J. Sullivan and GitHub
8b5d4708a0
Change a use of frozenset[int] to FrozenSet[int] ( #2352 )
...
Using FrozenSet is I think preferred (because it works in general) and
I am about to propose a mypy PR that breaks this particular use.
2018-07-31 15:51:14 -07:00
Sebastian Rittau and Jelle Zijlstra
1c8c6ec7d9
Add type hints to werkzeug's AcceptMixin ( #2349 )
...
* Add type hints to werkzeug's AcceptMixin
* Fix typo
2018-07-28 22:01:56 -07:00
Sebastian Rittau and Jelle Zijlstra
b5bddc479d
Add werkzeug annotations ( #2339 )
...
* Annotate werkzeug.http
* Annotate werkzeug.datastructures.Authorization
2018-07-20 08:13:32 -07:00
Jelle Zijlstra and GitHub
7d3ec1e0be
Improvements to pymysql ( #2220 )
...
* don't use type comments
* split up long lines
* all the constants are ints
* fixes to pymysql stub
* drop __all__, fix tabs
2018-07-13 19:43:09 -07:00
Jelle Zijlstra and GitHub
fc290167eb
Fixes to boto.s3.key stub ( #2317 )
...
* replace type comments in key.pyi
* reformat the file with black
* get_contents_as_string returns bytes unless an encoding is specified
http://boto.cloudhackers.com/en/latest/ref/s3.html#boto.s3.key.Key.get_contents_as_string
2018-07-13 19:39:24 -07:00
David Euresti and Jelle Zijlstra
99f25d0cd3
Click: Make group and command decorators return the correct types ( #2331 )
2018-07-13 19:23:47 -07:00
Sebastian Rittau and Jelle Zijlstra
dc9f9db77f
Assorted thirdparty fixes ( #2332 )
...
* pkg_resources.Distribution: Fix self arguments
* docutils: Remove spurious ellipses
* Add self argument to markupsafe.Markup.format()
While the actual signature is also "def format(*args, **kwargs)", the
implementation extracts "self" from "args" as first step.
* werkzeug: Remove methods not present during runtime
UpdateDictMixin.calls_update() and EnvironBuilder.form_property()
get deleted while constructing the respective class.
* requests: Add missing self argument
2018-07-13 19:23:23 -07:00
Amol Bhave and Jelle Zijlstra
8000513868
Change return type for click.Context.fail and click.Context.abort to NoReturn ( #2326 )
2018-07-11 20:16:55 -07:00
Amol Bhave and Jelle Zijlstra
66e9aa644b
Fix type for click.Context.exit ( #2325 )
...
click.Context.exit() calls sys.exit() and hence should be a NoReturn return type.
2018-07-11 19:58:18 -07:00
David Euresti and Jelle Zijlstra
2899d0a6aa
Make click decorators not modify the type ( #2322 )
2018-07-11 12:35:05 -07:00
Ran Benita and Jelle Zijlstra
cadacab088
Add missing attributes to the dateutil/relativedelta stub ( #2319 )
...
I have deduced the types from docstring & source code of the
relativedelta class.
Fixes #2269 .
2018-07-10 08:08:39 -07:00
Yusuke Miyazaki and Jelle Zijlstra
5bb58af6c8
Use float instead of Union[int, float] ( #2308 )
2018-07-09 19:02:03 -07:00
Bertrand Bonnefoy-Claudet and Jelle Zijlstra
f582b53ff7
Add stub file for click.testing ( #2243 )
...
Click already had stubs but not for the `testing` submodule.
I used stubgen and then narrowed the types when it was easy. I left
`Any` where more work was necessary.
2018-07-05 20:40:48 -07:00
Yusuke Miyazaki and Jelle Zijlstra
6192cce9d9
Avoid using string literals in type annotations ( #2294 )
2018-07-02 20:23:29 -07:00
Yusuke Miyazaki and Jelle Zijlstra
581705d9ee
Prefer to use ellipsis over pass ( #2292 )
2018-06-28 10:29:45 -07:00
potykion and Jelle Zijlstra
f35c5d1349
Jinja2 async support ( #2278 )
2018-06-28 10:24:37 -07:00
Yusuke Miyazaki and Jelle Zijlstra
86883d3df9
Remove unused import statements ( #2282 )
2018-06-27 20:14:57 -07:00
Nipunn Koorapati and Guido van Rossum
b7df5a670a
Add type stubs for google.protobuf.service ( #2187 )
2018-06-27 15:38:29 -07:00
Guido van Rossum and GitHub
5b32e79f4a
[gflags] Give DEFINE* default values Optional types ( #2279 )
...
I found some code that called DEFINE_integer() and DEFINE_float() with default set to None. Perusing the code that seems to be a totally valid usage. I am not super familiar with gflags but I believe this PR consistently changes all those default values to Optional[].
2018-06-26 13:53:39 -07:00
Ethan Smith and Jelle Zijlstra
de1755b263
Remove type cycle in click ( #2277 )
2018-06-26 07:24:55 -07:00
Guido van Rossum and Jelle Zijlstra
41e5fe4457
Message.WhichOneof returns Text, not bytes ( #2274 )
2018-06-23 15:42:13 -07:00
Sebastian Rittau and Jelle Zijlstra
b05e99297c
Drop Python 3.3 support from several stubs ( #2266 )
...
* Drop Python 3.3 support from importlib stubs
* Drop Python 3.3 support from html and symbol stubs
2018-06-20 16:46:11 -07:00
Jukka Lehtosalo and Ivan Levkivskyi
07374a8251
Fix requests.post signature ( #2256 )
...
The change introduced in 395ab5abd1
broke the signature of `requests.post`, among others, since
`MutableSequence` is invariant, and plain `Dict[str, str]` values
were no longer valid for the `data` argument.
This changes the signature to have `Any` components as a
compromise. Adding more items to the union seems a bit too much, since
the error messages for invalid argument types are already pretty hard to
read.
Another option might be to use `Mapping` instead of `MutableMapping`
due to covariance, but I assume there's a reason why `MutableMapping`
is used here.
2018-06-19 17:08:55 +01:00