Commit Graph

471 Commits

Author SHA1 Message Date
Charles Smith
097d2231b4 Fix type of lock parameter of cachetools.cachedmethod() decorator (#6144) 2021-10-11 12:13:33 +02:00
Jochen Sprickerhof
76b1f63ac2 Fix return type of readComponents() (#6143) 2021-10-11 09:23:36 +02:00
Nikita Sobolev
0142ea8b52 Add Redis.memory_purge() (#6138) 2021-10-09 17:02:28 +02:00
Nikita Sobolev
90f6727516 Add memory_stats() to Redis (#6137) 2021-10-09 11:57:59 +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
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
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
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
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
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
Hackrrr
2237daa650 Update for beautifulsoup4 for version 4.10 (#6059)
Tighten types and add missing fields
2021-09-22 17:42:42 +02: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
Edgar Ramírez
8ea6d6f331 Support name, content-type and headers in file upload (#6052)
`requests` supports not only passing binary file-like objects for multi-part file uploads but also additionally passing a name,  content-type and headers. This adds type hints for those options.

See https://docs.python-requests.org/en/master/user/quickstart/#post-a-multipart-encoded-file.
2021-09-20 06:46:22 -07:00
Sebastian Rittau
915feaceb6 maxminddb: Update version field and set obsolete_since (#6055) 2021-09-20 06:44:34 -07:00
Akuli
aff3e4d1c5 Create stubs for appdirs (#6047) 2021-09-20 13:20:06 +02:00
Akuli
75c75a093e ttkthemes: allow constructing ThemedStyle with no arguments (#6046) 2021-09-19 15:11:08 -07:00
Akuli
7ed8da4415 Create stubs for toposort (#6048) 2021-09-19 14:04:23 -07:00
Sebastian Rittau
d7bae50199 Update third-party package versions (#5996) 2021-09-18 20:08:38 -07:00
Sebastian Rittau
aa4a0c763a Fix distribution name backports.ssl_match_hostname (#5997)
Bump version number to latest version available on pypi

Turn backports.ssl_match_hostname into a package to match upstream
2021-09-18 20:08:21 -07:00
Sebastian Rittau
db69e41fda Add setuptools stubs (#5762) 2021-09-18 19:45:23 -07:00
Bas van Beek
a1ca55037a Update the xxhash and hashlib stubs (#6031)
* `name`, `block_size`, `digest_size` and `digestsize` attributes of hash objects were made read-only.
* It is now a type-checking error to subclass `xxhash` classes, such as `xxhash.xxh32`. Previously it was an error only at runtime.
* `xxhash` functions now accept strings as input and any object with `__index__()` method for `seed` (instead of requiring an integer). They also fail the type checking if no arguments are given.
2021-09-14 12:01:11 +03:00
Sam Martin
8a704ab290 Add more annotations to aws_xray_sdk.core.recorder (#6029) 2021-09-13 14:05:47 +02:00
Akuli
e69ca588ac Stubs for ttkthemes (#6024) 2021-09-10 15:59:12 +02:00
Nikita Sobolev
7d41e670ad Annotate more NamedTuples for psutil (#6021) 2021-09-10 14:14:36 +02:00
Jungkook Park
18d4868fce Fix type of blocking_timeout argument to redis.lock.Lock (#6019) 2021-09-10 04:27:05 +02:00
Nikita Sobolev
6122b5e8b4 Annotate several NamedTuples in psutil (#6016) 2021-09-09 22:37:00 +02:00
Nikita Sobolev
2a6f4afc80 Annotate more methods of psutil.Process (#6012) 2021-09-09 21:30:56 +02:00
Nikita Sobolev
6188a3eec7 Improves psutil/_common.pyi (#6010)
* Improves `psutil/_common.pyi`

In this iteration I've fixed the most obvious types and corrected several mistakes.
We can go deeper in the next iteration(s).

* We don't need to import `Union`

* Update _common.pyi

* Update _common.pyi

* Update _common.pyi
2021-09-06 20:37:53 +02:00
Fares Ahmed
d8ec167681 Fix type of stroke_width parameter in Pillow's ImageDraw.*text* functions (#6008) 2021-09-06 13:13:28 +02:00
Sebastian Rittau
2620120a90 Update deprecated.sphinx.deprecated signature (#6005)
The signature was changed in Deprecated 1.2.13.
2021-09-05 19:11:27 -07:00
Nikita Sobolev
1f7b87b6b7 Adds more missing ContextManager types (#6007)
1. c3e63b4dd5/psutil/_psbsd.py (L571)
2. c3e63b4dd5/psutil/_psosx.py (L365)
2021-09-05 17:57:33 -07:00
Nikita Sobolev
5d7e201784 Fix return type of Process.oneshot() (#6006) 2021-09-05 21:03:45 +02:00
Gergely Kalmár
96b5254056 Fix python-slugify replacements argument type (#6004)
Update version field, remove Python 2 compatibility marker
2021-09-05 20:44:23 +02:00
Akuli
832a24c8a1 Create send2trash stubs (#6000) 2021-09-03 22:51:03 +02:00
JP Sugarbroad
d5ff0e8399 dateutil.parser: Complete the isoparser module (#5983) 2021-09-02 14:57:16 +02:00
Akuli
6307bfd421 Delete yaml.CDangerLoader and yaml.CDangerDumper (#5990)
These no longer exist in PyYAML 4.2.
2021-09-01 10:50:30 +03:00
Jon Dufresne
a9a612df98 Add certifi.contents() (#5989)
Added in commit:
3e585603ff

Available since version 2020.04.05.
2021-08-31 21:10:04 -07:00
Ashley Whetter
026405b014 Add C{Full,Unsafe}Loader and UnsafeConstructor (#5988) 2021-09-01 00:50:31 +02:00