Anthony Sottile
cfa65b831b
flask.Flask.run: port can be str ( #2903 )
...
86bf9dca72/flask/app.py (L933)
2019-04-08 11:41:37 -07:00
Josh Morton
d46d36b7d7
Add six.moves types for email_mime sources. ( #2902 )
...
As a followup to the work done in #2767 and #2830 , and to address a
piece of #66 , most of the email_mime submodules aren't typed in six
under python2, only python3. Now they are.
2019-04-08 19:56:29 +02:00
Shahar Evron
0f5302b3b5
Accept bytes as 1st argument of simplejson.loads ( #2896 )
2019-04-02 16:40:59 +02:00
Brendan Long
d371513b80
werkzeug: ETagRequestMixin's functions are properties ( #2894 )
...
This was causing mypy to incorrectly flag reads of these properties
and complain that they're Callable, which is incorrect.
2019-03-30 18:44:10 +01:00
Christopher Dignam
f7c00b8b33
yaml: add full_load and full_load_all stubs ( #2892 )
2019-03-29 08:26:13 +01:00
Hynek Schlawack
7646506c14
Add missing dateutil.tz.UTC ( #2883 )
...
Co-Authored-By: hynek <hs@ox.cx >
2019-03-22 21:42:55 +01:00
yoshiyuho
0f1e453606
Fix werkzeug.UserAgentMixin annotation ( #2881 )
2019-03-22 08:24:44 +01:00
Jeff
168a968564
[third_party/click] add Exit exception definition ( #2880 )
2019-03-21 23:08:59 +01:00
JinyuanShanghai
15e1f76f61
move pycurl.pyi from 2 to 2and3 ( #2867 )
2019-03-14 23:14:52 +01:00
Tom Briggs
cd088c44d2
Click: add 'length' and 'label' properties to ProgressBar. ( #2860 )
2019-03-12 20:58:40 +01:00
Gabriel Corona
d595a46912
Fix several Flask types ( #2858 )
...
* Flask.static_folder is Optional
* Fix some types in Flask
2019-03-12 20:57:37 +01:00
Sebastian Rittau
6f00053511
Add stubs for bleach ( #2709 )
...
* Add stubs for bleach
* Support Python 2 for bleach
* Add missing imports
2019-03-10 21:08:46 -07:00
Gleb Chipiga
bf370b5908
Update attr stubs to 19.1.0 ( #2846 )
2019-03-11 00:11:26 +01:00
Eric Traut
06c682449f
Fix inconsistent self/cls parameter names ( #2838 )
...
Fixed several inconsistent parameter names so all instance methods take 'self' and all class methods take 'cls'. This avoids warnings or errors from linting tools that enforce standard naming conventions.
2019-03-10 03:17:55 +01:00
Eric Traut
748ad3d21f
Removed extraneous import statement that was redefining three symbols in markupsafe/__init__.py. This redefinition triggered type checking/linting errors. ( #2842 )
2019-03-10 02:57:54 +01:00
秋葉
b588d43a32
Add sunder names to enum ( #2822 )
...
Closes #2766
2019-03-06 15:31:53 +01:00
Jelle Zijlstra
b5897d5643
fix undefined name in flask stub ( #2811 )
2019-02-23 10:28:03 +01:00
Nipunn Koorapati
07ea6614c8
Genericize types for stringly typed methods on google.protobuf.Message ( #2807 )
2019-02-22 22:23:32 -08:00
秋葉
570fd6aff1
Add some missing annotations in cyaml ( #2769 )
...
* update annotation of cyaml
* fix wrong type
2019-02-17 13:28:05 -08:00
Bertrand Bonnefoy-Claudet
2bd16c42f6
Fix Flask stubs for dispatch_request ( #2796 )
...
`dispatch_request` can accept arbitrary arguments and can return
different values. To keep this simple and in line with the rest of the
stubs (e.g. with `view_func: Callable[..., Any]`), `Any` is used for the
return value although it is too broad.
Closes #2795 .
2019-02-15 00:08:25 +01:00
Antoine Fourmy
b3aac58db0
root_path cannot be None ( #2792 )
...
Fixes #2791
2019-02-12 14:00:56 +01:00
Ivan Levkivskyi
ca62cecd14
Fix Flask.config annotation ( #2787 )
2019-02-11 14:19:42 +01:00
ijl
9bbe60978e
Add type hints for orjson ( #2747 )
2019-02-11 01:56:57 +01:00
lincolnq
b00bb54dc5
Some small tweaks to Werkzeug stubs: ( #2784 )
...
* default_exceptions is a dict of classes, not instances
* Correctly overload 'redirect' to get the proper return type
* Request.get_data() is an Any (not bytes), just like Response.get_data
2019-02-09 20:30:28 +01:00
Utkarsh Gupta
e1a02a6f0a
decorators.pyi: Add overload to option() ( #2671 )
...
Fixes #1692
2019-02-09 19:05:07 +01:00
秋葉
e0e83a2dcc
Use a more accurate type for jwt.decode ( #2765 )
...
Closes #2764
2019-02-09 15:59:58 +01:00
Ingmar Steen
c5713205ff
requests.auth.AuthBase.__call__ deals with PreparedRequest. ( #2759 )
...
Both the argument and the return type are expected to be instances
of requests.models.PreparedRequest, not requests.models.Request.
2019-02-09 15:19:54 +01:00
Benjamin Peterson
6850b9d699
gflags: Add DEFINE_multi_enum. ( #2783 )
...
4f06c3d0d6/gflags/__init__.py (L800)
2019-02-08 15:14:52 -08:00
Paul Dagnelie
ed4323df30
Update models.pyi ( #2780 )
...
Currently, iter_lines() doesn't have any type annotations despite the types being very similar to iter_content and the types can be pretty readily derived from the source.
2019-02-07 07:21:57 -08:00
Andrew Svetlov
c45c0635c1
Add hidden and deprecated click.Command options ( #2778 )
2019-02-03 11:05:53 +01:00
Joachim Jablon
caefaa6af9
pkg_resources: fix stub for get_metadata_lines ( #2776 )
2019-02-01 07:58:49 -08:00
Joachim Jablon
90d3a6e2e2
pkg_resources Add PKG_INFO str attribute for Distribution class ( #2775 )
...
To avoid
```
error: "Distribution" has no attribute "PKG_INFO"
```
This is the corresponding implementation:
8f82e5077e/pkg_resources/__init__.py (L2531)
2019-02-01 07:58:13 -08:00
Pascal Corpet
75581cf7da
Create stubs for Flask ( #2740 )
...
See permission in pallets/flask#2012.
Fixes #28 .
2019-01-30 14:15:30 +00:00
Frazer McLean
9e5816a539
Fix six.raise_from value type ( #2746 )
...
Fixes #2742
2019-01-17 20:16:38 +01:00
David Euresti
c1953f2a00
Sync attr stubs from attrs github repo ( #2720 )
...
This include some changes like kw_only and some formatting changes.
2018-12-31 05:04:19 -08:00
Guido van Rossum
a2c0f4b827
Add stubs for six.ensure_{binary,str,text} functions ( #2704 )
2018-12-19 16:07:16 -08:00
Michael Lee
44e6b6e0d4
Add Str.kind field to typed_ast stubs ( #2699 )
...
We recently cut a new-ish release of typed-ast that [adds a new field][0]
named `kind` to the `ast27.Str` and `ast3.Str` classes. This field
stores whatever string modifiers (like `b` or `u`) were present on the
original string.
As a note, I've confirmed that this field is indeed a str (and not
bytes) for ast27's Str class.
[0]: https://github.com/python/typed_ast/pull/49
2018-12-18 10:37:19 -08:00
Dan Čermák
f7c9677703
Add members marker and unsafe_name to pkg_resources.Requirement ( #2693 )
...
For now specify Requirement.marker as Optional[Any] (as suggested by @srittau)
as we can't import packaging.markers (pkg_resource does that via runtime magic
in pkg_resources.external)
Closes #2961
2018-12-18 16:26:56 +01:00
Andrew Gaul
6206c5a9d3
Add stubs for tabulate ( #2384 )
2018-12-17 19:16:25 +01:00
Ilya Konstantinov
1564770456
Add pynamodb.models.Model.get_attribute and narrow down the type ( #2689 )
2018-12-17 17:06:42 +01:00
Dominik Gabi
dd2400df6a
Fix property annotation in third_party/2and3/boto/connection.pyi ( #2675 )
2018-12-07 23:35:37 +01:00
Jukka Lehtosalo
184148611a
Fix signature of TypedDict has_key() ( #2672 )
2018-12-05 18:17:37 +01:00
Michael Lee
6f061bbf1e
Add 'Literal[...]' to typing_extension stubs ( #2664 )
...
This pull request adds 'Literal' to the typing_extension stubs
and serves as the dual of this PR:
https://github.com/python/typing/pull/591
For background context, here's the associated PEP draft:
https://github.com/Michael0x2a/peps/pull/1
2018-12-05 00:46:23 +01:00
Jukka Lehtosalo
c8890b0f93
Add mypy fallback class for TypedDict methods to mypy_extensions ( #2670 )
...
This class is not defined at runtime but it's used by
mypy internally to support TypedDict methods.
Use NoReturn in argument types for better type safety
when the related mypy plugin hook is not active.
2018-12-04 18:21:58 +00:00
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
jhance
5663dba895
[gflags] add known_only arg to __call__ ( #2646 )
2018-11-28 18:45:51 +00: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