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
Bertrand Bonnefoy-Claudet and Jelle Zijlstra
4b5a63d10f
Fix werkzeug.wrappers.BaseResponse.__init__ ( #2232 )
...
This additionally allows strings, bytearrays and string iterables to be
passed as the `response` argument of `BaseResponse` (and thus also
`Response`).
Strings and bytearrays are explicitly handled in `__init__` [1].
Strings are also featured on the Werkzeug front-page snippet (`'Hello
World!'`) [2].
[1]: https://github.com/pallets/werkzeug/blob/d129d17066768238139b8f8a5d667d9a4f4d68db/werkzeug/wrappers.py#L861
[2]: http://werkzeug.pocoo.org/
2018-06-15 07:24:22 -07:00
Bertrand Bonnefoy-Claudet and Jelle Zijlstra
15ad132393
Werkzeug stub fixes ( #2229 )
...
* Fix stub for werkzeug.exceptions.Aborter and abort
* `werkzeug.exceptions.abort` [1] was missing and is thus added here.
It's also commonly used in Flask as `flask.abort`.
* They both always raise [2], hence the `NoReturn` return type.
[1]: http://werkzeug.pocoo.org/docs/0.14/exceptions/#werkzeug.exceptions.abort
[2]: https://github.com/pallets/werkzeug/blob/d129d17066768238139b8f8a5d667d9a4f4d68db/werkzeug/exceptions.py#L708-L713
* Fix stub for werkzeug.wrappers.AuthorizationMixin
The code [1] uses `@cached_property` [2], which is basically a Python
property, and optionally returns an `Authorization` [3] object.
[1]: https://github.com/pallets/werkzeug/blob/d129d17066768238139b8f8a5d667d9a4f4d68db/werkzeug/wrappers.py#L1462-L1466
[2]: https://github.com/pallets/werkzeug/blob/d129d17066768238139b8f8a5d667d9a4f4d68db/werkzeug/utils.py#L35
[3]: https://github.com/pallets/werkzeug/blob/d129d17066768238139b8f8a5d667d9a4f4d68db/werkzeug/datastructures.py#L2438
2018-06-14 09:04:18 -07:00
Bertrand Bonnefoy-Claudet and Guido van Rossum
138073922d
Allow user-defined kwargs passed to click.group ( #1092 )
...
Fixes #1086
2017-03-29 10:20:41 -07:00
Bertrand Bonnefoy-Claudet and Guido van Rossum
f447cbdc89
Fix resource_string type: from str to bytes ( #734 )
...
Fixes #733
2016-12-05 11:20:16 -08:00