Gal Ben David
1d2ec3cd3b
Update orjson.pyi to support two new flags ( #3975 )
...
Updated orjson.pyi to support two new added flags `OPT_INDENT_2` and `OPT_NON_STR_KEYS`.
Renamed `__obj` to `obj` to allow using named parameter `obj` instead of positional, without getting errors.
2020-05-12 18:06:06 -07:00
Shantanu
637dba1beb
concurrent.futures: fix BrokenProcessPool base ( #3972 )
...
Co-authored-by: hauntsaninja <>
2020-05-11 21:52:55 -07:00
Graham Bleaney
66cd36268a
Refine types on tornado.web.RequestHandler ( #3970 )
...
This diff refines the types on `RequestHandler` by porting types directly from the `tornado` repo.
2020-05-08 20:52:14 +02:00
Bruce Merry
c81b3cfe59
Fix some incorrect redis Text annotations ( #3969 )
...
I've changed some instances of `Text` to `_Key` so that bytes will be
accepted as well. I'm not sure if they should be `_Str` instead. The
existing annotations seem to use a mix of the two. _Str is a better
reflection of what redis-py will accept (any arguments that it passes
through to the redis server can be _Str and it'll convert to bytes); but
passing an int or float where a key is expected may be a code smell.
2020-05-07 19:32:56 -07:00
Ivan Levkivskyi
5342d66dcc
Fix assert_has_calls() signature ( #3967 )
...
See the docs https://docs.python.org/3/library/unittest.mock.html#unittest.mock.Mock.assert_has_calls
2020-05-05 19:20:56 +01:00
Rahix
d818821121
atomicwrites: Allow any PathLike for paths ( #3965 )
...
As of version 1.4.0, from PR untitaker/python-atomicwrites#48 ,
atomicwrites allows any PathLike object for its path args.
2020-05-05 14:01:24 +02:00
Anis
630b50e458
feat(3rd_party): adding stub for tzlocal ( #3948 )
...
- tzlocal uses pytz types
2020-04-29 22:28:01 -07:00
Jia Chen
db2ee3cf3c
Replace value assignments with import statements in requests.__init__ ( #3941 )
2020-04-25 13:18:03 +02:00
Lars
9dab57b0e8
Fix attr-defined check for werkzeug.wrappers.BaseRequest ( fixes #3913 ) ( #3925 )
...
The PR #2740 added __setattr__ and __getattr__ to the
werkzeug.wrappers.BaseRequest definition to silence mypy when
monkeypatching this class.
The change disabled the errors for monkeypatching, but disabled disabled the
important check attr-defined.
2020-04-25 13:14:31 +02:00
Max R
31705fca7a
Add misc types for mock and unittest.mock ( #3923 )
2020-04-24 08:51:34 +02:00
Brian Turek
6e9e059f0c
Add return type for pathlib.Path.replace on Python >= 3.8 ( #3936 )
2020-04-22 01:52:33 +02:00
Peter Pentchev
0503fb0f50
Fix some pkg_resources variable types. ( #3919 )
...
Allow passing proper metadata to Distribution.from_location() and
Distribution.from_filename().
Correct the order of arguments for the importer functions.
Note that some functions accept any iterables, not just sized ones.
Correct the type of the VersionConflict classes' context.
2020-04-09 12:22:14 +02:00
Vishal Kuo
12b53fa46d
[redis] add some missing stubs to redis ( #3907 )
2020-04-04 21:51:06 -07:00
Shantanu
e56adddc48
dataclasses: change hash to unsafe_hash, add a minor overload ( #3892 )
...
Co-authored-by: hauntsaninja <>
2020-04-03 17:23:05 -07:00
David Euresti
5f4ad2b014
Update stubs for attrs 19.3.0 ( #3900 )
2020-04-02 20:14:53 +02:00
Shantanu
ab6811aa4f
yaml: fix python version availability ( #3891 )
2020-03-31 17:05:39 +02:00
Katelyn Gigante
bf502024da
Return types for some flask methods ( #3888 )
2020-03-31 16:44:47 +02:00
Rodrigo Castro
4b14e245d4
Mock and MagickMock subclassing NonCallableMock ( #3871 )
2020-03-24 15:32:57 +01:00
Rodrigo Castro
ef1d7853ee
stdlib.3.unitest.mock.NonCallableMock signatures ( #3846 )
2020-03-20 14:37:18 +01:00
coiax
cd1b56662c
Fixes inaccuracies in redis scan methods ( #3870 )
...
The scan() and scan_iter() methods for redis Client objects had
incorrect stubs, this has been fixed.
Tested on pyredis 3.3.8; the output of those functions does depend on
the `decode_responses` configuration, so Any was used instead of a Union
return type.
2020-03-20 12:15:51 +01:00
Sahith Nallapareddy
8e0af4e651
Adding datetimerange stubs ( #3845 )
2020-03-17 15:57:36 +01:00
Debjyoti Biswas
c0938525d8
Add methods for subnet_of and supernet_of ( #3851 )
2020-03-17 10:06:49 +01:00
Shantanu
1b13e94108
yaml: mark keyword-only args ( #3854 )
...
Co-authored-by: hauntsaninja <>
2020-03-16 15:51:12 -07:00
Shantanu
4b360ca2c8
TypedDict: fix keys, values, items return value ( #3529 )
...
Fixes #3473
Co-authored-by: hauntsaninja <>
2020-03-13 21:03:22 -07:00
Julin S
b44cd294c4
add chardet.universaldetector ( #3734 )
2020-03-12 18:20:41 +01:00
Ivan Levkivskyi
aa945cde03
Add six.moves.collections_abc. ( #3812 )
2020-03-06 00:13:24 +00:00
Jukka Lehtosalo
1c08bf7fa2
Improve an annotation in tornado stubs ( #3809 )
2020-03-05 14:34:14 +00:00
Sebastian Rittau
68190cefde
Fix stubs for pymysql ( #3781 )
2020-03-05 09:21:52 +01:00
Ivan Levkivskyi
8b28b49c61
Mark some obviously incomplete stubs as incomplete ( #3807 )
2020-03-04 17:02:14 +00:00
Ivan Levkivskyi
e7d68027e7
Fix some issues in cryptography ( #3802 )
2020-03-02 18:50:45 +00:00
Andrew
d53977221a
Added count argument to spop ( #3786 )
...
* Added `count` argument to `spop`
* Fixed default value
2020-02-28 22:07:15 +01:00
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