Commit Graph

23 Commits

Author SHA1 Message Date
Alex Waygood 03b4bb9cce Stdlib: add many missing __hash__ and __eq__ methods (#10464) 2023-07-17 14:21:02 +02:00
Alex Waygood 81b8211d0e Revert "Remove un-needed __hash__ methods from stdlib (#8465)" (#10426)
Reverts https://github.com/python/typeshed/pull/8465
Fixes https://github.com/python/typeshed/issues/10424
Closes https://github.com/python/typeshed/pull/10425

https://github.com/python/typeshed/pull/8465 caused regressions: see https://github.com/python/typeshed/issues/10424 and https://github.com/python/mypy/issues/13800. Since it didn't fix any known problems (just some stylistic nits that we had), let's just revert the PR.
2023-07-09 08:43:32 -07:00
Alex Waygood 257e287fec Stdlib: correct many parameter names (#9815) 2023-03-04 09:53:12 +00:00
Alex Waygood 9ed39d8796 Use typing_extensions.Self in the stdlib (#9694) 2023-02-09 09:12:13 +00:00
Jelle Zijlstra ddfaca3200 stdlib: add argument default values (#9501) 2023-01-18 09:37:34 +01:00
Nikita Sobolev 0bd4e3ce1a ip_interface can have tuple arguments (#9195) 2022-11-14 11:02:56 +01:00
Nikita Sobolev 6d5fd0e290 Allow passing tuples to ipaddress.ip_network (#8634) 2022-08-27 18:38:26 +01:00
Nikita Sobolev 64bc0590a6 Remove un-needed __hash__ methods from stdlib (#8465) 2022-08-06 14:55:27 +01:00
Alex Waygood edc0ecd857 Remove Python 3.6 branches from typeshed (#8269) 2022-07-11 10:55:17 +02:00
Alex Waygood 97a74bc1aa Import from collections.abc wherever possible (#7635) 2022-04-18 12:50:37 +02:00
Alex Waygood 740193a8fc Use TypeAlias where possible for type aliases (#7630) 2022-04-15 18:01:00 -07:00
Jukka Lehtosalo 04100b9cec Improve signature of overlaps in ipaddress (#7260)
The `overlaps` method returns False if the version is different:

```
import ipaddress as i
v4=i.IPv4Network('10.0.0.0/8')
v6=i.IPv6Network('2001:db8::2000/124')
print(v6.overlaps(v4))  # False
```
2022-02-18 07:36:07 -08:00
Alex Waygood d869f2e5a3 Improve ipaddress dunders (#7244) 2022-02-16 18:55:39 -08:00
Alex Waygood f4967618dd Fix positional-only differences in many stdlib modules (#7226) 2022-02-15 15:14:06 +01:00
Nikita Sobolev 819f8dfc10 Improve ipaddress module (#7129) 2022-02-04 21:19:34 -08:00
Shantanu b88a6f19cd Upgrade black version (#7089) 2022-01-30 16:27:06 -08:00
Alex Waygood 45a2dad83c Reduce use of Any in equality methods (#7081)
Co-authored-by: Akuli <akuviljanen17@gmail.com>
2022-01-30 00:59:00 +02:00
Alex Waygood 96c9abb058 Always use _typeshed.Self, where applicable (#6880)
* Always use `_typeshed.Self`, where applicable

* Revert changes to `google-cloud-ndb` (ambiguous)

* Remove empty line added by script

* Revert changes to `stubs/python-dateutil/dateutil/relativedelta.pyi`

* Manually add a few more that the script missed

* Improve `filelock` annotation

Source code here: https://github.com/tox-dev/py-filelock/blob/79ec7b2826e33b982fe83b057f359448b9d966ba/src/filelock/_api.py#L207

* Improve `opentracing/scope` annotation

Source code here: https://github.com/opentracing/opentracing-python/blob/3e1d357a348269ef54d67f761302fab93dbfc0f7/opentracing/scope.py#L71

* Improve `redis/client` stub

Source code here: https://github.com/redis/redis-py/blob/15f315a496c3267c8cbcc6d6d9c6005ea4d4a4d5/redis/client.py#L1217

* Improve `redis/lock` annotation

Source code here: https://github.com/redis/redis-py/blob/15f315a496c3267c8cbcc6d6d9c6005ea4d4a4d5/redis/lock.py#L155

* Improve `requests/models` annotation

Source code here: https://github.com/psf/requests/blob/d718e753834b84018014a23d663369ac27d1ab9c/requests/models.py#L653
2022-01-09 19:16:19 -08:00
Akuli 99f6e022f7 ipaddress: return unions from ip_address, ip_network, ip_interface (#6400) 2021-11-28 08:06:22 -08:00
Alex Waygood f29d2bb72c Add missing scope_id property to IPv6Address (#6399) 2021-11-27 17:02:35 +02:00
Akuli 994b69ef8f Use lowercase tuple where possible (#6170) 2021-10-14 17:18:19 -07:00
Akuli ee487304d7 Big diff: Use new "|" union syntax (#5872) 2021-08-08 11:05:21 +02:00
Ivan Levkivskyi 16ae4c6120 Re-organize directory structure (#4971)
See discussion in #2491

Co-authored-by: Ivan Levkivskyi <ilevkivskyi@dropbox.com>
2021-01-27 12:00:39 +00:00