Commit Graph

4893 Commits

Author SHA1 Message Date
KotlinIsland
b7d1d099d9 add TypeGuard to coroutines.iscoroutine (#6105)
make CoroutineType extend Coroutine
2021-10-09 17:01:36 +02:00
Théo Cavignac
e018ad66dc General object for sys.ps1 and sys.ps2 (#6139) 2021-10-09 15:38:39 +03:00
Nikita Sobolev
90f6727516 Add memory_stats() to Redis (#6137) 2021-10-09 11:57:59 +02:00
EXPLOSION
ca983cd319 Allow empty strings for show in tkinter.ttk.Treeview (#6135) 2021-10-09 11:17:02 +03:00
hardikpnsp
ee31999caf Add missing methods to ExtensionFileLoader (#6120)
Closes: #4769
2021-10-08 23:14:32 +02:00
Nikita Sobolev
373c4e582a traceback can be None in sys.excepthook (#6133) 2021-10-08 09:17:32 +00:00
Đỗ Quốc Vương
3c58736d01 Change type of backupCount from str to int (#6128) 2021-10-07 15:31:53 +02:00
Saaket Prakash
750d366767 Add missing annotations for psutil (#6124) 2021-10-07 11:43:19 +02:00
Nikita Sobolev
88cb22e952 Improves psutil (#6103)
Add a few items and annotations to psutil
2021-10-07 09:37:50 +02:00
Shantanu
55cf343ba9 zip: update for PEP 618 (#6123)
Resolves #6122

Co-authored-by: hauntsaninja <>
2021-10-06 12:54:47 -07:00
github-actions[bot]
a3e4fcca26 Remove unused stubtest allowlist entries (#6119)
Co-authored-by: hauntsaninja <hauntsaninja@users.noreply.github.com>
2021-10-05 21:07:49 -07:00
Kevin Rose
98dde9c364 Mark some contextlib method arguments as positional-only (#6118) 2021-10-05 19:41:52 -07:00
Kevin Rose
47e9788246 Add the rest of string.Template's class attributes (#6109) 2021-10-05 18:26:34 +02:00
Sebastian Rittau
ad7d478a8f Use release version of Python 3.10 (#6116) 2021-10-05 15:49:51 +03:00
Nikita Sobolev
b84af5a4af Add several missing type annotations to psutil._common (#6104) 2021-10-05 14:30:00 +03:00
Shantanu
c7ac9b6641 markdown: fix type of Pattern (#6115)
Surfaced weirdly by #6109

Co-authored-by: hauntsaninja <>
2021-10-04 21:35:26 -07:00
Jake Bailey
2912ab0092 Update pyright to 1.1.175 (#6110) 2021-10-04 18:17:24 -07:00
Jake Bailey
b9ea346c14 Use overrides for IntFlag dunder-r methods (#6114) 2021-10-04 18:00:36 -07:00
Jake Bailey
4707e1d763 Fix use of unexported Pool type in multiprocessing.pool (#6111) 2021-10-04 17:20:24 -07:00
Jake Bailey
368bd2cb28 Properly export bytes from paramiko.py3compat (#6113) 2021-10-04 17:12:28 -07:00
Jake Bailey
e19b20032b Properly export types from psutil._compat (#6112) 2021-10-04 17:11:45 -07:00
Anton Grübel
5f1adbfbd2 Add missing property in urllib.response, fix code types (#6108) 2021-10-04 16:01:33 -07:00
Peter Law
9b86402c77 pickle: use protocols instead of IO[bytes] (#6101) 2021-10-02 11:32:16 +03:00
Matthew Suozzo
947e851cf8 Remove typevar in mock.patch.multiple (#6090) 2021-09-30 19:14:10 +02:00
Akuli
62f27cf6b8 Remove unncessary MutableMapping overrides (#6097) 2021-09-30 18:02:38 +02:00
Akuli
3eee9e1d88 Add back and update cachetools stubs to cachetools 4.2.4 (#6096) 2021-09-30 16:53:01 +02:00
Sebastian Rittau
32bc2161a1 Unbreak CI (#6093)
* Temporarily remove `cachetools` stubs. They will be added back soon, and meanwhile they will continue to be available on pypi.

* Remove `filelock.logger()` (no longer exists in filelock 3.2)

* Delete `OpenSSL.crypto` from stubtest whitelist

Co-authored-by: Akuli <akuviljanen17@gmail.com>
2021-09-30 14:18:47 +03:00
MapleCCC
b04512eaaa Fix return type of st2tuple() and STType.totuple() (#6091) 2021-09-30 09:35:38 +02:00
hardikpnsp
fe4062af54 Fix "value" types in dump and dumps (#6085) 2021-09-29 15:07:29 +02:00
Kumar Aditya
25ae5b8871 Add __await__, name, qualname to CoroutineType (#6087) 2021-09-29 14:07:09 +02:00
Matthew Suozzo
9efd6521be Fix unittest.mock.patch class decorator annotation. (#6070) 2021-09-29 09:27:47 +02:00
Luciano Ramalho
b99ddc1f2f change chained maps to MutableMapping (#6044)
Fixes #6042
2021-09-28 21:18:50 -07:00
Steve Dignam
4ef07810c4 redis: include local property on Lock class (#6083)
The Lock class as a property local that has a token property that sometimes
needs be accessed / set.

```python
lock = redis.lock(key)
lock.local.token = token
lock.extend(10)
```

Technically the type of `local` is `SimpleNamespace | threading.local`
but I think this setup is a bit stricter but satisfies the API.
2021-09-28 21:16:23 -07:00
Nikita Sobolev
4ac969ad2c Fixes __init__ of typing.NamedTuple (#6080)
Closes #6079
2021-09-28 20:42:27 -07:00
Zac Hatfield-Dodds
7cc5eb2950 StackSummary.extract() takes an Iterable (#6084) 2021-09-28 09:24:54 +02:00
Vincent Pelletier
4c0dccac0f Fold remaining custom stdlib *Buffer types into _typeshed. (#6082)
Add ctypes base type to WriteableBuffer.
Add a ReadOnlyBuffer type from fcntl.
Base ReadableBuffer on WriteableBuffer and ReadOnlyBuffer.
Use these types in fcntl and ctypes stubs.
2021-09-28 09:15:26 +02:00
Ju4tCode
328d09a9a5 Fix error type for inspect Parameter/Signature empty (#6073) 2021-09-27 13:49:22 +02:00
Nikita Sobolev
b905dd2945 Specify concrete types for DateDataParser attributes (#6075) 2021-09-27 10:21:28 +02:00
cmckain
57c26d5b2c PageElement.find_all() can return any subclass of PageElement (#6081) 2021-09-27 09:54:40 +02:00
Nikita Sobolev
a9227ed985 Improves Popen types in psutil (#6074) 2021-09-25 12:42:05 -07:00
Nikita Sobolev
583aa16876 Further improvements to psutil (#6072)
Adds types to the following functions:
- `psutil.environ()`
- `psutil.send_signal()`
- `psutil.sensors_temperatures()`
- `psutil.sensors_fans()`
- `psutil.sensors_battery()`
2021-09-25 13:07:58 +03:00
Sebastian Rittau
3128c6afbf requests: Response.encoding can be None (#6067)
The type of the `encoding` attribute was previously typed as `str`, even though it can be `None` at runtime.
2021-09-25 11:50:36 +03:00
Nikita Sobolev
2217ac8a8c Further annotations for the psutil module (#6066) 2021-09-24 10:56:15 +02:00
Nikita Sobolev
3bc309daaa Adds AM_STR and PM_STR to locale.py (#6065) 2021-09-24 10:51:33 +02:00
Hackrrr
2237daa650 Update for beautifulsoup4 for version 4.10 (#6059)
Tighten types and add missing fields
2021-09-22 17:42:42 +02:00
Shantanu
67e8979ac1 stubtest_third_party: more newlines in printing (#6060)
Co-authored-by: hauntsaninja <>
2021-09-21 23:16:12 +02:00
Estelle Poulin
15cec1da8e Change Traversable to be inline with pathlib.Path (#5818)
`pathlib.Path` objects are now valid `importlib.abc.Traversable`s.
2021-09-21 21:36:10 +03:00
Matthew Hughes
d1a556cec9 Update Session.prepare_request, .get_adapter (#6058) 2021-09-21 19:15:45 +02:00
Gregory Oschwald
28eb7c8b4d Remove maxminddb stubs in favor of upstream (#6043) 2021-09-20 16:19:07 -07:00
Akuli
eb7b97ee78 Add types to Markdown (#6045)
Most methods and attributes were previously untyped or `Any`-typed.

Co-authored-by: PythonCoderAS <13932583+PythonCoderAS@users.noreply.github.com>
Co-authored-by: Sebastian Rittau <srittau@rittau.biz>
2021-09-20 18:39:53 +03:00