Commit Graph

597 Commits

Author SHA1 Message Date
Ivan Levkivskyi
ca1ca0c14f Move tornado to 2and3 (#3780)
This also uses a trick to avoid `Incompatible with supertype` errors for `get()` etc. that used to have signature like `def get(*args, **kwars): ...` (that btw is used in tornado itself, see https://github.com/tornadoweb/tornado/blob/master/tornado/web.py#L266).
2020-02-26 22:53:48 +00:00
Ivan Levkivskyi
6d33cf3382 Move gflags to 2and3 (#3779)
Move gflags to 2and3
2020-02-26 17:57:50 +00:00
lazytype
cfe69831e9 Include typing for Enum __order__ attribute (#3541)
Based on the behavior here: 0b41a922f9/Lib/enum.py (L91)
the `__order__` attribute should be treated the same as `_order_`
2020-02-21 21:40:33 -08:00
Jaromir Latal
7b38214280 cryptography: Make mode in Cipher.__init__ optional (#3751) 2020-02-21 20:49:04 -08:00
Michael J. Sullivan
7b630ca24a Add unquote_to_bytes to py2 six (#3744) 2020-02-19 23:42:57 +01:00
ijl
ea0a9c2bd6 Update orjson annotations to 2.4.0 (#3737) 2020-02-14 08:32:24 -08:00
Rune Tynan
e3ddfd46b4 Fix missing type for dataclasses (#3708)
* Add missing return type to make_dataclass

* Fix consistency check
2020-02-02 21:58:15 -08:00
Gisle Aas
ed3f6f5ffd Add stub for dateutil.easter (#3695) 2020-02-01 10:34:09 +01:00
Michael Heyns
ad2ce11497 Support for PathLike objects in Jinja2 2.11.0 (#3683) 2020-01-30 01:51:13 +01:00
Fionn Fitzmaurice
d413b4b162 Fix Crypto.Random.randrange argument types (#3662)
Crypto.random.randrange takes the same argument types as random.randrange.
2020-01-26 18:54:01 +01:00
Benjamin Peterson
2da1b2c426 gflags: Add is_parsed/IsParsed. (#3650) 2020-01-23 08:33:25 +01:00
Squirrel
5d328a0c3f update stub for pycurl module (#3530) 2020-01-18 08:03:35 -08:00
Anthony Sottile
d0f57d7d38 Fill out more attributes in six (#3589) 2020-01-18 07:41:51 -08:00
Daniel Däschle
91d000e434 fix: add samesite parameter to set_cookie (#3614)
* Fixes #3609
* Implements samesite parameter of the set_cookie method in the werkzeug module (https://werkzeug.palletsprojects.com/en/0.15.x/wrappers/#werkzeug.wrappers.BaseResponse.set_cookie)
2020-01-15 12:04:11 +01:00
Daniël van Eeden
c4bdd90d86 Allow requests to have timeout: Tuple[float, None] (#3612) 2020-01-14 15:28:22 +01:00
Cal Paterson
1421fb1074 Change Response.headers from MutableMapping to CaseInsensitiveDict (#3610)
This fixes a type error when doing `response.headers.lower_items()`, a method
present on CaseInsensitiveDict
2020-01-14 12:41:30 +01:00
Sebastian Rittau
fdeae5d00e Enable --disallow-subclassing-any (#3591)
Closes: #1446
2020-01-08 11:51:44 -08:00
rikhilraithatha
caca02b096 redis: add ping to PubSub (#3583) 2020-01-07 17:20:43 +01:00
Daniel Hahler
89c598f7c9 jinja2: add Template.{name,filename} (#3578)
Ref::
  - https://jinja.palletsprojects.com/en/2.10.x/api/#jinja2.Template.name
  - https://jinja.palletsprojects.com/en/2.10.x/api/#jinja2.Template.filename
2020-01-05 17:58:56 -08:00
Christopher Dignam
bd14fcaaa6 requests: type responses for PreparedRequest (#3577) 2020-01-06 00:27:21 +01:00
Pavel Savchenko
616b6d0f3b Add missing definitions to requests.utils (#3567)
Added:
+ DEFAULT_PORTS
+ extract_zipped_paths
+ select_proxy
+ rewind_body
2020-01-05 16:07:36 +01:00
Mickaël Schoentgen
b4d1da03aa Add missing Path.is_mount() introduced in Python 3.7 (#3566) 2020-01-05 16:04:52 +01:00
Jeppe Fihl-Pearson
fed3472e7c Reflect Python 3.8 updates to the pathlib stdlib module (#3568) 2020-01-03 08:47:50 -08:00
Artjoms Iskovs
61f139189e Fix RSAPublicNumbers stub (#3505)
`RSAPublicNumbers` is supposed to have an exponent `e` and modulus `n` instead of `p` and `q` (typo?)
2019-12-21 12:38:16 -08:00
abe
f7119c30ce Update stubs for Crypto.Random (#3546) 2019-12-19 22:26:51 +01:00
Jacob Beck
9d61baa7be add jinja macro fields (#3548) 2019-12-18 18:56:06 +01:00
Brian Maissy
c0c780a758 add a couple missing stubs and fix an incorrect return type for redis stubs (#3545) 2019-12-18 07:49:19 +01:00
Dylan Anthony
9b63192390 Update orjson stub from orjson repository(#3532) 2019-12-06 15:59:27 +01:00
toppk
86775c803e Minor fixes to cryptography (x509) (#3520) 2019-12-03 18:29:05 +01:00
toppk
b585c96e5d padding can take an int or an object (PSS.MAX_LENGTH) (#3521) 2019-12-03 13:26:16 +01:00
Katelyn Gigante
e8647d2d1d A few return annotations for redis client (#3517) 2019-12-02 21:06:11 -08:00
Ivan Levkivskyi
8df632bca5 Fix some issues in cryptography package (#3474)
Note: the verifier() methods are not in docs, but they don't look private and are actually used in some code.
2019-11-21 17:05:22 +00:00
Sebastian Rittau
79d4e0dd08 Add assorted werkzeug type hints (#3444)
* Annotate is_immutable()
* Annotate ImmutableListMixin and make generic
* Make ImmutableList generic and derive from generic List
* Annotate Accept
* Annotate MIMEAccept
* Fix annotation of parse_accept_header()
2019-11-06 10:37:18 -08:00
Markus Bauer
f39c102eb8 Add more stubs to redis (pubsub and monitor) (#3442) 2019-11-06 12:05:51 +01:00
Jeremy Lainé
047caa9096 Add more stubs for cryptography (#3307) 2019-11-04 12:41:11 +01:00
Jon Dufresne
66c3945ca4 Remove certifi.old_where (#3436)
The function was removed from the API in commit (Nov 26, 2018):

a462d21c3f
2019-11-03 18:26:43 +01:00
Greg Ward
603458ba09 Fix some incorrect/incomplete annotations for redis.client.PubSub (#3408)
* redis: Fix return value declarations in redis.client.PubSub

get_message() was declared incorrectly. Start here:

  https://github.com/andymccurdy/redis-py/blob/3.3.11/redis/client.py#L3298-L3300

where it's obvious that get_message() returns either None or the
output of handle_message().

So what does handle_message() return? Combine:

  https://github.com/andymccurdy/redis-py/blob/3.3.11/redis/client.py#L3316-L3336
  https://github.com/andymccurdy/redis-py/blob/3.3.11/redis/client.py#L3366

and you can see it returns None or a dict mapping str to something.

* redis: Fix incorrect declaration for PubSub.get_message() argument

Docstrings says it's a float:

  https://github.com/andymccurdy/redis-py/blob/3.3.11/redis/client.py#L3293-L3295

And it eventually gets passed to settimeout() on a socket:

  https://github.com/andymccurdy/redis-py/blob/3.3.11/redis/connection.py#L182

* redis: Annotate one more method arg in PubSub class

get_message() and handle_message() are closely related:
ignore_subscribe_message does the same in both, and its default value
in both is False.
2019-10-30 07:33:00 -07:00
Angela Ambroz
b5b9a3959d Add pytz.FixedOffset (#3393) 2019-10-29 19:50:20 -07:00
Dima Boger
aae01b8de0 Add sort_keys param to all dump-like functions in PyYAML (yaml) lib (#3417) 2019-10-29 19:44:04 -07:00
Taneli Hukkinen
beaf306d12 Allow None for click.core.Context.default_map (#3416) 2019-10-29 00:10:27 +01:00
Utkarsh Gupta
72ff7b94e5 __init__.pyi: Accept RSAPrivateKey or RSAPublicKey as the key (#3410)
Closes: #3381
2019-10-26 21:09:06 +02:00
Ilaï Deutel
bf944dbf94 Update stubs for tabulate (#3391) 2019-10-24 20:19:08 -07:00
Anthony Sottile
9feb21d029 Add werkzeug.exceptions.FailedDependency (#3403)
Available since werkzeug==0.15.0
2019-10-24 00:14:52 +02:00
Sebastian Rittau
ec7960a8cb Convert namedtuples to class syntax (#3321) 2019-10-20 10:37:33 +02:00
JR Heard
bf862d9079 Add missing @property to Response.next() stub (#3384) 2019-10-18 10:23:15 +02:00
David Tucker
38fbdc9490 Fix show_default type in click.option signatures (#3385) 2019-10-18 10:22:02 +02:00
Trim21
6b68fb04c9 pymysql.Cursor is a context manager (#3379) 2019-10-17 15:01:55 +02:00
Jakub Stasiak
6e4f6403ac Add PEP 593 (Annotated etc.) typing_extensions stubs (#3369)
The code has been added to typing_extensions in
https://github.com/python/typing/pull/632 and
https://github.com/python/typing/pull/639/.
2019-10-16 11:41:38 -07:00
Benjamin Peterson
add16d2715 protobuf: Fix inadvertently deleted annotations. (#3364)
* protobuf: Fix inadvertantly deleted annotations.

* Run black on protobuf.
2019-10-14 13:41:58 -07:00
Sebastian Rittau
0501e2b329 Annotations for remaining Python 3.8 additions (#3358)
* Add os.add_dll_directory()
* Add memfd_create() and flags
* Add type annotation to flags
* Add stat_result.st_reparse_tag and flags
* Add ncurses_version
* Add Path.link_to()
* Add Picker.reducer_override()
* Add plistlib.UID
* Add has_dualstack_ipv6() and create_server()
* Add shlex.join()
* Add SSL methods and fields
* Add Python 3.8 statistics functions and classes
* Remove obsolete sys.subversion
* Add sys.unraisablehook
* Add threading.excepthook
* Add get_native_id() and Thread.native_id
* Add Python 3.8 tkinter methods
* Add CLOCK_UPTIME_RAW
* Add SupportsIndex
* Add typing.get_origin() and get_args()
* Add unicodedata.is_normalized
* Add unittest.mock.AsyncMock

Currently this is just an alias for Any like Mock and MagicMock. All of
these classes should probably be sub-classing Any and add their own
methods. See also #3224.

* Add unittest cleanup methods
* Add IsolatedAsyncioTestCase
* Add ElementTree.canonicalize() and C14NWriterTarget
* cProfile.Profile can be used as a context manager
* Add asyncio task name handling
* mmap.flush() now always returns None
* Add posonlyargcount to CodeType
2019-10-14 09:53:48 +02:00