jhance
1254b30f94
[protobuf] add deterministc option ( #2666 )
2018-12-03 21:53:31 +00:00
Pascal Corpet
b4b81fba24
Properly type the ToJsonString method of time well known types in google protobuf ( #2656 )
2018-11-30 13:42:58 +01:00
Utkarsh Gupta
407e4bb679
decorators.pyi: Add Any angument to Callable[] ( #2654 )
...
Fixes #2615
2018-11-30 10:33:22 +01:00
Utkarsh Gupta
03981de076
__init__.pyi: Fix dump() ( #2640 )
...
Fixes #2089
2018-11-28 09:08:30 +01:00
Florian Bruhin
25c5f3cace
yaml: Add __version__ attribute ( #2636 )
2018-11-27 20:56:01 -08:00
Keith Gray
9c3978e337
Added cyaml.pyi ( #2613 )
...
Closes #1996
2018-11-24 18:13:14 +01:00
Matt Gilson
8aa5feac57
Update types for requests.adapters ( #2614 )
2018-11-22 12:06:58 +01:00
Maarten ter Huurne
89b06c833d
Add stub for pytz.VERSION ( #2619 )
2018-11-21 22:04:00 +01:00
Sebastian Rittau
82c59a7fc2
Merge Python 2 and 3 versions of itsdangerous ( #2564 )
2018-11-20 17:55:16 +01:00
Sebastian Rittau
cd75801aa5
Replace non-ellipsis default arguments ( #2550 )
2018-11-20 07:35:06 -08:00
Matt Gilson
b868c6c3c1
Relax type for click.echo. ( #2607 )
...
Fixes #2604
2018-11-18 19:25:11 -08:00
Pascal Corpet
c2ecb77ca5
Add options and extensions to google protobuf messages. ( #2589 )
2018-11-07 09:54:38 +01:00
Pascal Corpet
23db1fc137
Strengthen typing of datetime methods of Google protobuf's Timestamp. ( #2590 )
2018-11-07 01:46:02 +01:00
Sebastian Rittau
0730fe5fcb
Fix return of patch() and patch.multiple() ( #2520 )
...
* Fix return of patch() and patch.multiple()
* Update third party mock as well
2018-10-25 20:55:11 -07:00
Sebastian Rittau
006a79220f
Flake8 fixes ( #2549 )
...
* Fix over-indented continuation lines
* Fix under-indented continuation lines
* Fix whitespace around default operator problems
* Limit line lengths
* Fix inconsistent files
2018-10-24 07:20:53 -07:00
Sebastian Rittau
6d6894e1ef
Annotate werkzeug wrap_file() and FileWrapper ( #2519 )
...
* Add FileWrapper protocol to wsgiref.types
* Annotate werkzeug's wrap_file and FileWrapper
* Remove empty line at end of file
* Fix _Readable protocols
2018-10-23 13:43:53 +02:00
Grzegorz Śliwiński
4ed42f899e
click.option's defined type as return type of callable ( #2505 )
2018-10-16 03:53:29 +02:00
Ruben Berenguel
3814d47aff
Change json arguments in requests to Any ( #2497 )
...
Fixes #2492
2018-09-30 09:23:34 -07:00
Ran Benita
4f396f8130
Improve the pytz stubs ( #2475 )
...
Based on the pytz docs http://pytz.sourceforge.net/ and code (version
2018.5).
- Accurately model the return value of the `timezone()` function. This
necessitates modeling the internal pytz class hierarchy which is quite
inconsistent.
- Expose `_BaseTzInfo` as `BaseTzInfo`.
This change is useful because this type is importable and otherwise
there is no pytz type which can be used in type annotations, e.g. in a
function which takes a pytz `tzinfo` with the `localize` method,
rather than a general `datetime.tzinfo`.
- Remove the lazy.pyi stubs. The `lazy` module contains some unrelated
general data structures. It is not a public API - it is not documented
and the types are not included in `__all__`.
- Remove methods which are already specified by inheritance in
`datetime.tzinfo`.
- Add several public exception classes.
- Fill in the generic type parameters of the exposed `Dict`/`List`
constants. Also change `Dict` -> `Mapping` because it is not actually
a proper `dict`.
- Some style/ordering improvements.
2018-09-26 07:11:24 -07:00
Rebecca Chen
cfa52c7c38
Add a stub for google.protobuf.json_format. ( #2479 )
2018-09-25 21:03:27 -07:00
Ivan Levkivskyi
75e13a0f36
Add Final to typing_extensions ( #2453 )
2018-09-13 15:07:42 +01:00
Sebastian Rittau
27514df2bd
Fix annotation of boto Key.set_contents_from_string ( #2445 )
...
Closes #1552
2018-09-11 08:25:25 -07:00
Jelle Zijlstra
9d62d6d5c5
fix __metaclass_ references ( #2402 )
2018-09-06 18:24:03 -07:00
Ivan Levkivskyi
8ed0159445
Remove duplicate method definitions in importlib and jinja2 ( #2427 )
2018-09-04 07:50:47 -07:00
Teddy Sudol
c52c59f521
Remove duplicate adapters import. ( #2414 )
...
This causes an error in pytype.
2018-08-23 17:01:47 -07:00
Tomasz Trębski
50a62b6a6a
Improve werkzeug/exceptions typings ( #2405 )
2018-08-22 08:49:11 -07:00
Sebastian Rittau
a2676ec972
Improve werkzeug stubs ( #2391 )
2018-08-17 08:35:14 -07:00
Devin Fee
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
0f6f2abc30
Add another undocumented mypy_extension that we are trying out ( #2374 )
2018-08-09 15:57:46 +01:00
Max Murin
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
Michael J. Sullivan
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
Guido van Rossum
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
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
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
b5bddc479d
Add werkzeug annotations ( #2339 )
...
* Annotate werkzeug.http
* Annotate werkzeug.datastructures.Authorization
2018-07-20 08:13:32 -07:00
Jelle Zijlstra
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
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
99f25d0cd3
Click: Make group and command decorators return the correct types ( #2331 )
2018-07-13 19:23:47 -07:00
Sebastian Rittau
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
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
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
2899d0a6aa
Make click decorators not modify the type ( #2322 )
2018-07-11 12:35:05 -07:00
Ran Benita
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
Bertrand Bonnefoy-Claudet
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
6192cce9d9
Avoid using string literals in type annotations ( #2294 )
2018-07-02 20:23:29 -07:00
Yusuke Miyazaki
581705d9ee
Prefer to use ellipsis over pass ( #2292 )
2018-06-28 10:29:45 -07:00
potykion
f35c5d1349
Jinja2 async support ( #2278 )
2018-06-28 10:24:37 -07:00
Nipunn Koorapati
b7df5a670a
Add type stubs for google.protobuf.service ( #2187 )
2018-06-27 15:38:29 -07:00
Ethan Smith
de1755b263
Remove type cycle in click ( #2277 )
2018-06-26 07:24:55 -07:00
Guido van Rossum
41e5fe4457
Message.WhichOneof returns Text, not bytes ( #2274 )
2018-06-23 15:42:13 -07:00