Commit Graph

291 Commits

Author SHA1 Message Date
Slava Koyfman
7e4a0cbbd2 freezegun: Add as_kwarg argument (#6220) 2021-11-02 15:31:58 +01:00
Nikita Sobolev
151f256051 croniter: Add missing arguments and functions, add types (#6215) 2021-10-30 18:50:20 +02:00
Huw Jones
b98cd0c3b0 Annotate humanfriendly.__init__.pyi (#6209) 2021-10-28 16:16:54 +02:00
Huw Jones
ce7484f70b Add defaults to GCM.__init__ arguments (#6207) 2021-10-28 12:57:40 +02:00
Sebastian Rittau
4e592ada7b Upgrade PyYAML to version 6 (#6183)
* Fix load_all() argument
* Remove Python 2 remnants
  + Replace Text with str
  + Replace alias "_Str" with str
  + Import from collections.abc and re where applicable
  + Remove Python 2 branches
* Fix PyYaml allowlist entries
  + Add yaml._yaml and move CParser and CEmitter there.
  + Add missing functions, classes, and arguments.
* Use relative imports in some modules.
* Add __all__ to yaml.cyaml.
* Remove unnecessary noqa markers.
2021-10-22 20:05:58 +02:00
Roman Joost
3a70f34ddd Stubs for google.cloud.ndb the Google Cloud Datastore ndb client library (#5821) 2021-10-21 07:15:53 +02:00
Daniel Huckins
cf78194c76 Annotate Client.decr() and decrby() (#6179) 2021-10-16 18:46:52 +02:00
Nikita Sobolev
0e24e1fe66 Add redis/sentinel.pyi (#6174) 2021-10-15 12:04:56 +02:00
Akuli
994b69ef8f Use lowercase tuple where possible (#6170) 2021-10-14 17:18:19 -07:00
Akuli
75ca712f3c check_new_syntax.py: check nested annotations (#6167) 2021-10-14 00:28:38 +03:00
Akuli
f30b5ae363 dateparser.search.search_dates: allow arbitrary-length tuples for languages argument (#6166) 2021-10-13 23:22:58 +03:00
Alexandre Viau
b0e1cef4dd freezegun: _freeze_time.__enter__ return a freeze factory (#6164) 2021-10-13 22:11:44 +02:00
Akuli
e72a4034bf Cleanup: use lower-case list and dict, add a test (#6161) 2021-10-13 22:59:27 +03:00
Nipunn Koorapati
39867f1096 Bump protobuf stub to 3.18.1 and mypy-protobuf 3.0.0 (#6157)
* Bump protobuf stub to 3.18.1 and mypy-protobuf 3.0.0

* Fix ConsumeInteger in google/protobuf/text_format.pyi

The arg was removed in protobuf 3.18
2021-10-12 14:33:22 -07:00
cmckain
71f2e4ab0a Put Generic last in base class list (#6155) 2021-10-12 17:58:19 +02:00
Sebastian Rittau
bb24e77404 Update remaining versions for third-party stubs (#6094)
Also remove the python2 markers of packages that don't list Python 2
as supported in the latest version.

Don't special case version '0.1'

Co-authored-by: Akuli <akuviljanen17@gmail.com>
2021-10-12 12:30:45 +02:00
Sebastian Rittau
9f86972350 Add star to all non-0.1 versions (#6146) 2021-10-11 13:41:19 -07:00
Jochen Sprickerhof
b16ec5451a Annotate rruleset.rrule(rrule) argument (#6149) 2021-10-11 20:23:40 +02:00
Nikita Sobolev
2eadf9c174 Annotate PIL.ImageColor (#6151) 2021-10-11 18:20:02 +02:00
Nikita Sobolev
023c4dff67 Color arguments also take (r,g,b,a) tuples (#6148) 2021-10-11 14:56:59 +02:00
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