Commit Graph

29 Commits

Author SHA1 Message Date
Shantanu
88fa182253 Use PEP 570 syntax in third party stubs (#11554) 2024-03-10 14:11:43 +01:00
Alex Waygood
df08fcec5f Improve __(r)or__ signatures for TypedDict classes (#10565) 2023-08-12 18:27:35 +01:00
Sebastian Rittau
afe18e95a9 Add an upstream_repository field to METADATA.toml (#10487)
Closes: #10478
2023-07-20 16:45:41 +02:00
Avasam
078c6a0958 Update Unused parameters in stubs/ (#9704)
* Update _Unused TypeAlias

* Update `object | None` params

* Replace unused `object` parameters with `Unused` alias
2023-02-21 23:52:52 -08:00
Avasam
ed6748fb32 Stubtest settings: change ignore_missing_stub default to false (#9779)
If you're reading about this commit from an autogenerated changelog entry, this should have no user-visible impact on how the stubs are interpreted by a type checker; it's just an internal change to how typeshed's tests work.
2023-02-20 22:37:45 +00:00
Alex Waygood
7180d0223b Use typing_extensions.Self instead of _typeshed.Self (#9702) 2023-02-15 11:32:43 +01:00
Jukka Lehtosalo
bba1c67610 Update mypy_extensions stubs to 1.0.x (#9675) 2023-02-04 12:54:39 +00:00
Alex Waygood
2c052651e9 Normalise use of Never vs NoReturn (#8549) 2022-08-17 21:53:40 +01:00
Alex Waygood
cf0b3a2596 Improve .keys(), .values(), .items() methods for TypedDicts (#8532) 2022-08-12 20:02:43 -07:00
Alex Waygood
7eaedd44dd Add missing TypedDict methods and ClassVars (#8512) 2022-08-10 10:29:40 +01:00
Sebastian Rittau
faae950ade Use error codes for type ignores (#8280)
Disable reportSelfClsParameterName for pytype as this is out of typeshed's
control

Closes: #7497
2022-07-12 20:15:49 +02:00
Shantanu
b6379e7c7a Check missing definitions for several packages (#8167)
Co-authored-by: hauntsaninja <>
2022-06-26 08:56:18 +01:00
Alex Waygood
1be5918baa Use _typeshed.IdentityFunction more consistently (#8063) 2022-06-12 16:56:14 -07:00
Alex Waygood
54e11a1ec4 mypy_extensions: fix TypeVar usage (#7937)
#7928
2022-05-24 11:26:35 -07:00
Alex Waygood
5c6178a821 Import generics from standard modules in all third-party stubs (#7791) 2022-05-07 10:35:50 +02:00
Akuli
e613fc483b Delete python 2 branches from third-party stubs (#7741)
Since #7703, we no longer have third-party stubs that support Python 2, so code like `if sys.version_info >= (3, 0)` can be simplified.
2022-04-29 20:53:01 +01:00
Sebastian Rittau
f7aa41245e Drop Python 2 support in third-party stubs (#7703) 2022-04-27 15:32:17 +03:00
Shantanu
b88a6f19cd Upgrade black version (#7089) 2022-01-30 16:27:06 -08:00
Mehdi Drissi
b8bea1b2c9 Improve trait signature in mypy_extensions.pyi (#7027)
Co-authored-by: Mehdi Drissi <mdrissi@snapchat.com>
2022-01-25 11:03:54 +01: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: 79ec7b2826/src/filelock/_api.py (L207)

* Improve `opentracing/scope` annotation

Source code here: 3e1d357a34/opentracing/scope.py (L71)

* Improve `redis/client` stub

Source code here: 15f315a496/redis/client.py (L1217)

* Improve `redis/lock` annotation

Source code here: 15f315a496/redis/lock.py (L155)

* Improve `requests/models` annotation

Source code here: d718e75383/requests/models.py (L653)
2022-01-09 19:16:19 -08:00
Alex Waygood
a40d79a4e6 Use lowercase type everywhere (#6853) 2022-01-08 16:09:29 +01:00
Shantanu
1b80461b96 mypy_extensions: fix NoReturn, remove inaccurate comment (#6595) 2021-12-15 19:45:57 -08:00
Sebastian Rittau
9f86972350 Add star to all non-0.1 versions (#6146) 2021-10-11 13:41:19 -07:00
Akuli
ce11072dbe Big diff: use lower-case list and dict (#5888) 2021-08-08 09:26:35 -07:00
Akuli
ee487304d7 Big diff: Use new "|" union syntax (#5872) 2021-08-08 11:05:21 +02:00
Shantanu
7244ea1f71 Test third party stubs with stubtest (#5615) 2021-06-13 00:17:40 +02:00
Shantanu
fa9d5a5e9f future first: switch the order of some if statements (#5206)
Since we're adding this to our contribution guidelines in
https://github.com/python/typeshed/pull/5205
2021-04-11 06:44:18 -07:00
Eric Traut
e2967a8bee Eliminated the use of "bare" TypeVars in stdlib stubs (#5041)
Eliminated the use of "bare" TypeVars (i.e. a TypeVar that appears only once) within generic methods. While not considered an error in PEP 484, these are a common source of bugs in code, and some type checkers (including pytype and pyright) flag them as errors.

Co-authored-by: Eric Traut <erictr@microsoft.com>
2021-02-27 19:43:45 -08: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